You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Daniel Bigham <da...@wolfram.com> on 2016/05/12 20:06:53 UTC
SpanNearQuery With Inner Phrases
When constructing boolean queries, the "parts" can themselves be
phrases, and can be parsed as follows:
QueryBuilder(analyzer).createPhraseQuery(fieldName, phrase)
The above call is handy in that, even if the part is a single word, it
will get tokenized and turned into the appropriate term.
If I'd like to do something similar -- a SpanQuery where the "parts" can
be phrases, how would I do that?
A SpanQuery can't have a PhraseQuery as one of its parts, which seems to
rule out using QueryBuilder.createPhraseQuery.
One idea would be to continue using QueryBuilder.createPhraseQuery but
then manually convert that into a SpanNearQuery.
What's the right way to do this?
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org