orientechnologies / orientdb-gremlin

TinkerPop3 Graph Structure Implementation for OrientDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gremlin doesn't use Lucene indexes

bigman73 opened this issue · comments

A Vertex Class property exists and an index of type FULL TEXT Lucene is using it.
With ODB SQL the command works, uses the index and return results as expected:

	select firstName, lastName from people where searchData LUCENE 'orient~ -nodejs'

But with a gremlin query the Lucene index is not used for the query and no results return:

   g.V().hasLabel('people').has('searchData', 'orient~ -nodejs')

The expected behavior is that if a field (searchData in this example) has a Lucene index assigned to it then the Lucene engine would use the search value

Hi @bigman73

unfortunately there is no way. has step is translated to = in SQL which does not use Lucene indexes. AFAIK TP3 does not support predicate like.
http://tinkerpop.apache.org/docs/current/reference/#a-note-on-predicates
It would be cool to have TP3 support something like P.like("orient~ -nodejs") that could be easily translated into a lucene query