relationship - OrientDB: using Lucene to query related document fields -
say have movie vertices connected person vertices directedby , starring edges.
consider orientdb query works expected:
select *, out("directedby").name, out("starring").name movie out("directedby") contains (name = 'john ford')
that correctly returns movies directed persons name "john ford". however, want perform query using lucene full text search give little more flexibility.
i think have indexes set correctly, query directly on persons table succeeds produces results:
select * person name lucene 'john ford'
however trying use lucene operator in query of movie vertices produces no results:
select *, out("directedby").name, out("starring").name movie out("directedby") contains (name lucene 'john ford')
am doing wrong? or trying not possible?
in order use lucene, should execute select it, not inside contains. try should super fast:
select *, out("directedby").name, out("starring").name ( select expand( in("directedby") ) person name lucene 'john ford' )
the inner select uses lucene find "john ford", crosses connected movies in("directedby")
. used expand()
because need result outer select display information want.
Comments
Post a Comment