Re: Query requires iterating over all vertices
toggle quoted message Show quoted text
The difference between “text” and “string” is explained here: https://docs.janusgraph.org/index-backend/text-search/
In short, “text” is for full-text search (tokenized search) capability while “string” is for whole string match. You can also take a look at https://codecurated.com/blog/elasticsearch-text-vs-keyword which explains Elasticsearch’s Text (corresponding to “text” in JanusGraph), and Keyword (corresponding to “string” in JanusGraph). The same applies to Lucene.
Speaking of your use case, has(“country”) is interpreted as a “TraversalFilter” step in Gremlin, different from has(“country”, “value”) which is interpreted as a “GraphStep”. JanusGraph only applied indexes when it saw a “GraphStep”. Starting from 0.6.0 (unreleased yet), indexes are also applied for “has(key)” steps. This is just FYI.