Michael Gibney created LUCENE-8543:
--------------------------------------
Summary: Add QueryBuilder support for explicitly building
SpanNearQuery and/or inOrder=true
Key: LUCENE-8543
URL: https://issues.apache.org/jira/browse/LUCENE-8543
Project: Lucene - Core
Issue Type: New Feature
Components: core/queryparser
Reporter: Michael Gibney
{{QueryBuilder}} has historically built phrases according to the semantics of
{{(Multi)PhraseQuery}} (which incorporates the concept of order, but allows for
negative offsets in calculating slop/edit distance).
LUCENE-8531 corrected a bug that substituted {{SpanNearQuery (inOrder=true)}}
implementation for graph phrase queries despite the fact thatĀ for {{slop > 0}}
the semantics of {{SpanNearQuery (inOrder=[true|false])}} differ from the
semantics of {{(Multi)PhraseQuery}}.
Inspired by (but not related to) LUCENE-8531, this issue considers the
likelihood that there are some common use cases for which {{SpanNearQuery}}
semantics may be preferable to the semantics of {{PhraseQuery}}. The
distinction between the two is clearer for the {{inOrder=true}} case of
{{SpanNearQuery}}, which disallows negative offsets in calculating slop/edit
distance.
The logic for building {{SpanNearQuery}} is already present in
{{QueryBuilder}}; perhaps {{QueryBuilder}} could expose that logic so that it
can be leveraged in cases that explicitly desire {{SpanNearQuery}} (and
associated semantics).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]