Hi.

I am trying to make a NGramPhrase query that could tolerate terms missing,
so even if one of the NGrams doesn't match it still gets picked up by
search.
I know I could use the combination of normal SpanNearQuery and a
BooleanQuery, but it requires me to consider every possible pair of terms
(since any one of the terms could be missing) and it gets too messy and
expensive.

What I want to try is to use SpanTermQuery to get the positions of the
mathcing NGrams and list the spans' position informations in an order, so
that I could pick up any two or more spans near each other to score them
accordingly, but I can't figure out how can I combine the spans.

Any help in solving this issue is appreciated. Also, if there is an example
of a simple scoring implementation example that combines multiple queries'
results, it would be very nice.

Reply via email to