lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Updated) (JIRA)" <>
Subject [jira] [Updated] (LUCENE-3624) Throw exception for "Multi-SortedSource" instead of returning null
Date Wed, 07 Dec 2011 15:56:40 GMT


Robert Muir updated LUCENE-3624:

    Attachment: LUCENE-3624.patch

Here's a patch. I did the same for getArray() <-- don't call this if hasArray() returns
false or you get UOE, consistent with ByteBuffer.

Now if you try to merge a SlowMultiReaderWrapper, the error is more obvious:
    [junit] java.lang.UnsupportedOperationException: asSortedSource is not supported
    [junit] 	at org.apache.lucene.index.values.IndexDocValues$Source.asSortedSource(
    [junit] 	at org.apache.lucene.index.values.SortedBytesMergeUtils.buildSlices(
    [junit] 	at org.apache.lucene.index.values.VarSortedBytesImpl$Writer.merge(
    [junit] 	at org.apache.lucene.index.codecs.PerDocConsumer.merge(
    [junit] 	at org.apache.lucene.index.SegmentMerger.mergePerDoc(
    [junit] 	at org.apache.lucene.index.SegmentMerger.merge(
    [junit] 	at org.apache.lucene.index.IndexWriter.addIndexes(
> Throw exception for "Multi-SortedSource" instead of returning null
> ------------------------------------------------------------------
>                 Key: LUCENE-3624
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Task
>            Reporter: Robert Muir
>         Attachments: LUCENE-3624.patch
> Spinoff of LUCENE-3623: currently if you addIndexes(FIR) or similar, you get a NPE deep
within codecs during merge.
> I think the NPE is confusing, it looks like a bug but a clearer exception would be an

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message