Lucene query on an expanded result set

33 views
Skip to first unread message

Aris Alexis

unread,
Nov 16, 2015, 10:33:53 AM11/16/15
to OrientDB
I have User and Post classes and Posts edge class

this works

SELECT FROM (SELECT EXPAND(OUT('Posts')) FROM User WHERE username='marco') WHERE body LIKE '%China%'


this works

SELECT FROM Post WHERE body LUCENE 'China'


this doesn't work

SELECT FROM (SELECT EXPAND(OUT('Posts')) FROM User WHERE username='marco') WHERE body LUCENE 'China'


error message is:

com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing command at position #0: LUCENE condition is allowed only when query target is a Class or an Index

how can I write differently this query?

alessand...@gmail.com

unread,
Nov 16, 2015, 11:35:56 AM11/16/15
to OrientDB
Do you put a lucene index on the property "body"?

Kind regards,
Alessandro

Aris Alexis

unread,
Nov 17, 2015, 4:16:40 AM11/17/15
to OrientDB
Yes it is shown

select expand(indexes) from metadata:indexmanager

and the second query in the original post works. Should I post a bug on github?

alessand...@gmail.com

unread,
Nov 17, 2015, 5:45:44 AM11/17/15
to OrientDB
Yes, you can open an issue on github
Reply all
Reply to author
Forward
0 new messages