Hi,
I would like to write a query composed of a BooleanQuery (several
clauses) and a SpanQuery (SpanNearQuery), where both are mandatory.
Sounds simple but I have to work on spans returned by this query.
I know that I could use a Filter, but my goal is to get the spans from
the « combined » query : BooleanQuery + SpanQuery. Even if I filter my
BooleanQuery with the SpanQuery, spans returned by the
SpanQuery.getSpans(reader) are not « filtered » by the BooleanQuery.
Since executing the query is not needed to get spans from a SpanQuery I
understand this behaviour.
My current implementation first runs the BooleanQuery filtered by the
SpanQuery. I then get the spans from the SpanQuery and remove from them
all docs that are not in the score docs returned by the filtered
BooleanQuery. Is there a more efficient, simple or clever way to reach
the same goal?
Thank you very much in advance for your advices.
Best regards,
mercibe
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org