Hi, I know this issue has been discussed before but I have got confused and would like to open this thread to clarify.
In my current understanding:
* we have, both:
* indexed steps (get the benefit of an indexing backend - if applies to an external indexed key - e.g. has()), and
* not indexed steps (for this reason are discouraged by performance, e.g. filter())
* on the other hand, in a GremlinPipeline, we have both:
* a graph query -> having has() as method
* a vertex query -> having both has() and filter() as methods
All examples about indexing a backend
looks to be made on a Graph Query. On the other hand, the recommendation is to use has() over filter() to take advantage of indexing. This is claimed
here:
has: [...] Titan will actually try to use indices where it sees the opportunity to do so
If in a vertex query, I browse the implementation of has() and filter(), I do not see big difference in code. They both call to processNextStart():
Rest of code in the vertex query is agnostic if either a has() or a filter() was in place so none of them looks really indexed.
Actually I do not see in code any intend for indexing search in the vertex query. So:
* Are you referring exclusively to Graph Queries when claiming about indexing? (this looks the only possibility as I see in code)
* If so, when encouraging has() over filter(), are you perhaps referring to the has() in graph query vs the filter() in vertex query (i.e. disregarding the has() in vertex query)? (Therefore the discussion would be more about what query type to use rather than what step to use).
* If so, does this mean than expected performance in has() in vertex query and filter() in vertex query is about the same (considering that currently none of them is really indexed in code)?
Or, I am missing something, or documentation looks to be confusing has() in index query and has() in graph query and also I missing the mention about if vertex queries get the benefit of being indexed (something that I previously assumed) or not.
Thanks