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

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 exist?

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

Tests with failures [seed: 37A276DFB0A942FC]:
  - org.apache.lucene.search.ElevationComparatorSource.initializationError
  - org.apache.lucene.search.ElevationComparatorSource.initializationError
  - org.apache.lucene.search.JustCompileSearch.initializationError
  - org.apache.lucene.search.JustCompileSearch.initializationError
  - org.apache.lucene.search.MultiThreadTermVectorsReader.initializationError
  - org.apache.lucene.search.MultiThreadTermVectorsReader.initializationError


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)
{code}
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: 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to