GitHub user imbajin added a comment to the discussion: Secondary index and full tet query in Hugegraph
> In Janusgraph secondary index used to be e.g elastic search, same way in > hugegraph also has that concept? > > ``` > graph.schema().indexLabel("personByAge") > .onV("person") // Apply to vertices of type "person" > .by("age") // Index the "age" property > .secondary() // Use a secondary index > .ifNotExist() > .create(); > ``` > > What is the role of `secondary()` here and how it works? > > Also, full text search isnt supported yet, so what is the future plan for > this? > > ``` > // For full-text query (not supported now) > SEARCH(3, "search"), > ``` @dosu, you should refer https://github.com/apache/incubator-hugegraph/issues/884#issuecomment-595670139 to answer the question in English > The hugegraph database index support is already relatively comprehensive. > Graph database indexes generally include the following aspects: - Graph Index / Edge Index: Mainly used to accelerate the retrieval of a vertex's associated edges, generally using adjacency lists or cross-linked lists, and can also use hash indexes. hugegraph uses adjacency lists. - Supernode Index: Mainly used to accelerate the retrieval of some associated edges of supernodes, such as querying the call edges of the 12315 number in the most recent week. hugegraph is implemented through sortkey, which is equivalent to an enhanced version of the adjacency list. - Secondary Index (ordinary attribute index): Mainly used to accelerate the retrieval of vertices based on attributes, or the retrieval of edges based on attributes. Databases generally use btree or hash implementations. - Range Index (comparable attribute index): Mainly used to accelerate the retrieval of vertices or edges based on attribute ranges, such as people with `age>18`. Databases generally use btree implementations. - Shard Index (attribute index that can be retrieved by prefix + comparison): Mainly used to accelerate the retrieval of vertices or edges based on attribute ranges, such as people with `city=Beijing && age>18`. - Search Index (full-text searchable attribute index): Mainly used to accelerate the retrieval of vertices or edges based on any text segment or word in the attribute value, such as people with `city contains Bay`. The implementation of attribute indexes in hugegraph depends on the storage and mainly relies on lsm-tree; the implementation principle of full-text indexes is to perform word segmentation on the attribute text and then store the index. Reference document: [2.5 IndexLabel](https://hugegraph.apache.org/docs/clients/hugegraph-client/#25-indexlabel) Perhaps we can use some automatic translation plugins or LLM to automatically summarize and translate some common historical questions GitHub link: https://github.com/apache/incubator-hugegraph/discussions/2739#discussioncomment-12334934 ---- This is an automatically sent email for dev@hugegraph.apache.org. To unsubscribe, please send an email to: dev-unsubscr...@hugegraph.apache.org