I have a “parallel” index for the words and some attributes of the words: semantic, sentiment, speech part, case etc.
It’s possible to query mg4j with something like speech:V^sentiment:neg – select documents with the verbs having negative sentiment.
It’s possible to use distance query, for example (MAN BELIEVE)~3 works on default index field “text”, the distance query over other index fields also work: sem:(PersonName Organization*)~2 – searches for the document having person names mentioned near organization names.
My problem is to apply distance filter over different fields:
(sem:PersonName sentiment:neg)~3. In this case the query returns all the data satisfying the inner query ignoring the specified distance.
Is it possible to organize indexing and query parsing to make them sensitive to distance in terms over different fields of the index?