[ 
https://issues.apache.org/jira/browse/LUCENE-6871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14985800#comment-14985800
 ] 

Adrien Grand commented on LUCENE-6871:
--------------------------------------

I like the idea to reconcile regular queries and span queries, but on the other 
hand I'm slightly concerned that we could be bitten in the long term by some 
inconsistencies. For instance boosts on span queries only make sense on the 
top-level query (if I'm not mistaken). So if we start merging queries, we need 
to make sure that eg. Query.rewrite would not break scores. For instance it 
would be tempting to rewrite a SpanNearQuery to the underlying query if there 
is a single wrapped query. But if this underlying query has a boost that is 
different from 1f, this will produce different scores than the original 
SpanNearQuery would have produced. This is one issue I can think of but maybe 
there are more?

> Move SpanQueries out of .spans package
> --------------------------------------
>
>                 Key: LUCENE-6871
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6871
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: Trunk, 5.4
>            Reporter: Alan Woodward
>         Attachments: LUCENE-6871.patch
>
>
> SpanQueries are now essentially the same as a standard query, restricted to a 
> single field and with an extra scorer type returned by getSpans().  There are 
> a number of existing queries that fit this contract, including TermQuery and 
> PhraseQuery, and it should be possible to make them SpanQueries as well 
> without impacting their existing performance.  However, we can't do this 
> while SpanQuery and its associated Weight and Spans classes are in their own 
> package.
> I'd like to remove the o.a.l.search.spans package entirely, in a few stages:
> 1) Move SpanQuery, SpanWeight, Spans, SpanCollector and FilterSpans to 
> o.a.l.search
> 2) Remove SpanTermQuery and merge its functionality into TermQuery
> 3) Move SpanNear, SpanNot, SpanOr and SpanMultiTermQueryWrapper to 
> o.a.l.search
> 4) Move the remaining SpanQueries to the queries package
> Then we can look at, eg, making PhraseQuery a SpanQuery, removing 
> SpanMTQWrapper and making MultiTermQuery a SpanQuery, etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to