Property is absent In Creating Index

Hi,

  • Question
    I got a message called
    com.orientechnologies.orient.core.index.OIndexException: Index with name 'INDEX_v_bumenyuangong_18_p_bianhao_154' cannot be created on class 'v_bumenyuangong_18' because the field 'p_bianhao_154' is absent in class definition ,
    when creating index.
  • Maven
       <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-jdbc</artifactId>
            <version>3.0.29</version>
        </dependency>

        <dependency>
                <groupId>com.orientechnologies</groupId>
                <artifactId>orientdb-gremlin</artifactId>
                <version>3.0.29</version>
        </dependency>
  • Server
     orientdb-tp3-3.0.29
  • Description
    I find an issue #6415 signed closed.Now I meet it again,but sometimes.

  • Info
    and I executed the SQL :
    SELECT FROM (SELECT expand(classes) FROM metadata:schema) WHERE name = 'v_bumenyuangong_18',

    and the result like this:

{
    "result": [
        {
            "customFields": null,
            "defaultClusterId": 2301,
            "strictMode": false,
            "description": null,
            "abstract": false,
            "clusterIds": [
                2301,
                2302,
                2303,
                2304
            ],
            "superClass": "Instance638",
            "name": "v_bumenyuangong_18",
            "clusterSelection": "round-robin",
            "shortName": null,
            "overSize": 0,
            "properties": [
                {
                    "collate": "default",
                    "min": null,
                    "readonly": false,
                    "notNull": false,
                    "max": null,
                    "defaultValue": null,
                    "customFields": null,
                    "name": "p_bumenmingcheng_85",
                    "globalId": 990,
                    "description": null,
                    "type": 7,
                    "mandatory": false
                },
                {
                    "collate": "default",
                    "min": null,
                    "readonly": false,
                    "notNull": false,
                    "max": null,
                    "defaultValue": null,
                    "customFields": null,
                    "name": "p_bianhao_154",
                    "globalId": 989,
                    "description": null,
                    "type": 5,
                    "mandatory": false
                },
                {
                    "collate": "default",
                    "min": null,
                    "readonly": false,
                    "notNull": false,
                    "max": null,
                    "defaultValue": null,
                    "customFields": null,
                    "name": "p_yuangongmingcheng_36",
                    "globalId": 991,
                    "description": null,
                    "type": 7,
                    "mandatory": false
                },
                {
                    "collate": "default",
                    "min": null,
                    "readonly": false,
                    "notNull": false,
                    "max": null,
                    "defaultValue": null,
                    "customFields": null,
                    "name": "id",
                    "globalId": 31,
                    "description": null,
                    "type": 7,
                    "mandatory": false
                }
            ],
            "superClasses": [
                "Instance638"
            ]
        }
    ],
    "executionPlan": {
        "@type": "d",
        "@version": 0,
        "cost": 0,
        "prettyPrint": "+ FETCH FROM SUBQUERY \n  + FETCH FROM RIDs\n    [#0:1]\n  + CALCULATE PROJECTIONS\n    classes\n  + EXPAND\n+ FILTER ITEMS WHERE \n  name = 'v_bumenyuangong_18'",
        "type": "QueryExecutionPlan",
        "steps": [
            {
                "@type": "d",
                "@version": 0,
                "cost": -1,
                "subSteps": [
                    
                ],
                "name": "SubQueryStep",
                "description": "+ FETCH FROM SUBQUERY \n   + FETCH FROM RIDs\n     [#0:1]\n   + CALCULATE PROJECTIONS\n     classes\n   + EXPAND",
                "type": "SubQueryStep",
                "targetNode": "SubQueryStep",
                "javaType": "com.orientechnologies.orient.core.sql.executor.SubQueryStep",
                "@fieldTypes": "cost=l"
            },
            {
                "@type": "d",
                "@version": 0,
                "cost": 0,
                "subSteps": [
                    
                ],
                "name": "FilterStep",
                "description": "+ FILTER ITEMS WHERE \n  name = 'v_bumenyuangong_18'",
                "type": "FilterStep",
                "targetNode": "FilterStep",
                "javaType": "com.orientechnologies.orient.core.sql.executor.FilterStep",
                "@fieldTypes": "cost=l"
            }
        ],
        "javaType": "com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan",
        "@fieldTypes": "cost=l,steps=z"
    },
    "elapsedMs": 28,
    "notification": "Query executed in 0.052 sec. Returned 1 record(s)"
}

I find there is a property called p_bianhao_154.

SomeBody help !

Thanks

52HZ

Hi @52HZ

That’s strange, the property seems to be there, so it is supposed to succeed.
Do you have a reproducer, so that we can try to debug it?

Thanks

Luigi

Hi @luigidellaquila

okay, this is the git address,you can clone it :

https://github.com/OnlyXYL/WiklGraph.git

You can find the class called top.wikl.orientdb.error.ErrorTest. but maybe you find nothing about the error.Beacuse I met it sometimes