lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-2645) False assertion of >0 position delta in StandardPostingsWriterImpl
Date Sat, 04 Jun 2011 13:37:47 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael McCandless updated LUCENE-2645:
---------------------------------------

    Affects Version/s: 4.0

Bug only affects 4.0 (we don't have this assert in 3.x), but I'll backport the test case to
3.x to make sure.

> False assertion of >0 position delta in StandardPostingsWriterImpl
> ------------------------------------------------------------------
>
>                 Key: LUCENE-2645
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2645
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 4.0
>            Reporter: David Smiley
>            Assignee: Michael McCandless
>            Priority: Minor
>         Attachments: LuceneTrunkAssertErrorReproducer.java
>
>
> StandardPostingsWriterImpl line 159 is:
> {code:java}
>     assert delta > 0 || position == 0 || position == -1: "position=" + position +
" lastPosition=" + lastPosition;            // not quite right (if pos=0 is repeated twice
we don't catch it)
> {code}
> I enable assertions when I run my unit tests and I've found this assertion to fail when
delta is 0 which occurs when the same position value is sent in twice in arrow.  Once I added
RemoveDuplicatesTokenFilter, this problem went away.  Should I really be forced to add this
filter?  I think delta >= 0 would be a better assertion.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message