lucene-dev mailing list archives

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

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

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 oal.search 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: https://issues.apache.org/jira/browse/LUCENE-6871
>             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
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message