lucene-dev mailing list archives

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


Paul Elschot commented on LUCENE-6871:

Perhaps the java 9 modules are a better way to solve the problem here.
As far as I understand these will allow for packages that are not visible outside a module,
so we could use invisible packages for the current @lucene.internal code.
That also means we could have more packages instead of less.

There is a duplicate package private method termPositionsCost in SpanTermQuery and PhraseQuery,
only a single one would be needed when this is resolved. The patch is so large that I did
not check whether an "unduplication" is already in there.

The patch could be a lot smaller if git had an option for a file move in a patch. Does that

At the moment these core tests on the master branch fail:
ant test -Dtestcase=*search.*

Tests with failures [seed: 37A276DFB0A942FC]:

JVM J0:     0.42 ..    37.74 =    37.32s
JVM J1:     0.42 ..    37.82 =    37.40s
JVM J2:     0.41 ..    37.92 =    37.51s
JVM J3:     0.42 ..    37.59 =    37.17s
Execution time total: 37 seconds
Tests summary: 124 suites, 1077 tests, 6 errors, 6 ignored (5 assumptions)
The tests fail in the same way with the patch applied.
Should these test failures be dealt with at another issue?

Here java -version sais build 1.8.0_74-b02, is that a good one for now?

> 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