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-3874) bogus positions create a corrumpt index
Date Thu, 15 Mar 2012 17:57:40 GMT


Robert Muir updated LUCENE-3874:

    Attachment: LUCENE-3874_test.patch

Simple test that overflows posinc.

Output is:
    [junit] Testsuite: org.apache.lucene.index.TestIndexWriterExceptions
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.239 sec
    [junit] ------------- Standard Output ---------------
    [junit] CheckIndex failed
    [junit] Segments file=segments_1 numSegments=1 version=4.0 format=FORMAT_4_0 [Lucene 4.0]
    [junit]   1 of 1: name=_0 docCount=1
    [junit]     codec=SimpleText
    [junit]     compound=false
    [junit]     hasProx=true
    [junit]     numFiles=4
    [junit]     size (MB)=0
    [junit]     diagnostics = {os.version=3.0.0-14-generic, os=Linux, lucene.version=4.0-SNAPSHOT,
source=flush, os.arch=amd64, java.version=1.6.0_24, java.vendor=Sun Microsystems Inc.}
    [junit]     has deletions [delGen=-1]
    [junit]     test: open reader.........OK
    [junit]     test: fields..............OK [1 fields]
    [junit]     test: field norms.........OK [1 fields]
    [junit]     test: terms, freq, prox...ERROR: java.lang.RuntimeException: term [66 6f 6f]:
doc 0: pos -2 is out of bounds
    [junit] java.lang.RuntimeException: term [66 6f 6f]: doc 0: pos -2 is out of bounds
    [junit] 	at org.apache.lucene.index.CheckIndex.testPostings(
> bogus positions create a corrumpt index
> ---------------------------------------
>                 Key: LUCENE-3874
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-3874_test.patch
> Its pretty common that positionIncrement can overflow, this happens really easily 
> if people write analyzers that don't clearAttributes().
> It used to be the case that if this happened (and perhaps still is in 3.x, i didnt check),
> that IW would throw an exception.
> But i couldnt find the code checking this, I wrote a test and it makes a corrumpt index...

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