Adrien Grand commented on LUCENE-7491:

bq. I'm generally not really a fan of returning fake empty "should be null but 
caller can't be trusted" objects though

I don't disagree with this statement but I like the current situation even 
less. It makes things hard to test because of the branches it creates. Say you 
want to test the point range query on field {{foo}}, you need to test what 
happens when no fields have points, when foo has points and when foo does not 
have points but other fields from the same segment do. If you don't like 
returning non-null even when no fields have points, then maybe we should 
consider making points work per field like doc values, so instead of having 
{{LeafReader.getPointValues()}} and all methods of {{PointValues}} that take a 
{{String fieldName}} parameter, we could have 
{{LeafReader.getPointValues(String fieldName)}} and remove all {{String 
fieldName}} parameters from {{PointValues}}?

> Unexpected merge exception when merging sparse points fields
> ------------------------------------------------------------
>                 Key: LUCENE-7491
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7491
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: master (7.0), 6.3
>         Attachments: LUCENE-7491.patch, LUCENE-7491.patch
> Spinoff from this user thread: http://markmail.org/thread/vwdvjgupyz6heep5
> If you have a segment that has points, but a given field ("id") didn't index 
> points, and a later segment where field "id" does index points, when try to 
> merge those segments we hit this (incorrect!) exception:
> {noformat}
> Caused by: org.apache.lucene.index.MergePolicy$MergeException: 
> java.lang.IllegalArgumentException: field="id" did not index point values
>       at __randomizedtesting.SeedInfo.seed([9F3E7B030EF482BD]:0)
>       at 
> org.apache.lucene.index.ConcurrentMergeScheduler.handleMergeException(ConcurrentMergeScheduler.java:668)
>       at 
> org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:648)
> Caused by: java.lang.IllegalArgumentException: field="id" did not index point 
> values
>       at 
> org.apache.lucene.codecs.lucene60.Lucene60PointsReader.getBKDReader(Lucene60PointsReader.java:126)
>       at 
> org.apache.lucene.codecs.lucene60.Lucene60PointsReader.size(Lucene60PointsReader.java:224)
>       at 
> org.apache.lucene.codecs.lucene60.Lucene60PointsWriter.merge(Lucene60PointsWriter.java:169)
>       at 
> org.apache.lucene.index.SegmentMerger.mergePoints(SegmentMerger.java:173)
>       at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:122)
>       at 
> org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:4287)
>       at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3864)
>       at 
> org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:588)
>       at 
> org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:626)
> {noformat}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to