Unable to Create Tag Index on Name Property #5744
-
Hello, I am working on a project where I am trying to create a tag index on a router tag's name property in Nebula Graph. My goal is to match network devices using their names instead of their IDs. Here is the syntax I used: CREATE TAG INDEX router_name_index ON router(name); However, I encounter the following error: [ERROR (-1005)]: Invalid param! I have also tried specifying the data type like so: CREATE TAG INDEX router_name_index ON router(name string); But I received a syntax error: [ERROR (-1004)]: SyntaxError: syntax error near `string' I'm using Nebula Graph version 3.4 within docker-compose. Is there a correct syntax to create a tag index on a property or is what I'm attempting to do not supported? Any guidance or alternative suggestions would be greatly appreciated! Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Dear @bruckynetworks ! For string prop, we need to specify the length when indexing them! i.e. |
Beta Was this translation helpful? Give feedback.
Dear @bruckynetworks !
For string prop, we need to specify the length when indexing them!
https://docs.nebula-graph.io/3.6.0/3.ngql-guide/14.native-index-statements/1.create-native-index/#create_single-property_indexes
i.e.
CREATE TAG INDEX router_name_index ON router(name string(32));