lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: don't allow negatives in the positions file
Date Sat, 11 Aug 2012 13:04:06 GMT
+1, patch looks great.

Mike McCandless

http://blog.mikemccandless.com

On Sat, Aug 11, 2012 at 8:59 AM, Robert Muir <rcmuir@gmail.com> wrote:
> Hello, see the linked patch:
>
> http://pastebin.com/7JAaJ3EN
>
> Because of an ancient bug in lucene 2.4.0, we still allow -1 as a
> position. But this doesnt even work today (i created such an index,
> and phrase queries etc dont work because tons of lucene code assumes
> positions are >= 0).
> Additionally, these wont be compressible with bulk compression
> algorithms that assume positive integers.
>
> So I think we should throw exception in checkindex if someone has
> these negative positions.
>
> Just in case someone has a 2.4.0 index they migrated all the way up to
> 4.0, the patch contains code in preflex's reader to correct the -1
> delta to 0. This is no worse than today, in that phrase queries etc
> still wont work on these corrumpt positions, however the rest of the
> index will continue to work fine.
>
> --
> lucidimagination.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

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


Mime
View raw message