lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Woodward (JIRA)" <>
Subject [jira] [Commented] (LUCENE-6871) Move SpanQueries out of .spans package
Date Fri, 25 Mar 2016 10:34:25 GMT


Alan Woodward commented on LUCENE-6871:

The problem with moving them to queries (or sandbox!) is that there are a whole bunch of classes
in like ConjunctionDISI or DisiPriorityQueue that ought to be package-private,
but can't be because they're used by the Spans classes.

They're much more efficient than they were, and I don't think the public APIs are particularly
bad?  For the vast majority of users, you use a SpanQuery much as you would use any other
query.  And the impedance mismatch I think can be dealt with some better naming?  eg SpanNotQuery
could be a NonOverlappingSpanQuery instead.

> Move SpanQueries out of .spans package
> --------------------------------------
>                 Key: LUCENE-6871
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: 5.4, master
>            Reporter: Alan Woodward
>         Attachments: LUCENE-6871.patch, 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
> I'd like to remove the package entirely, in a few stages:
> 1) Move SpanQuery, SpanWeight, Spans, SpanCollector and FilterSpans to
> 2) Remove SpanTermQuery and merge its functionality into TermQuery
> 3) Move SpanNear, SpanNot, SpanOr and SpanMultiTermQueryWrapper to
> 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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message