You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ross Woolf <ro...@rosswoolf.com> on 2013/09/17 19:05:15 UTC

Position problems in 4.3.0

Most of my terms return the correct position that they are in, but there is
a percent or them that return really bad values.  For example, I have a
field that contains 5 terms, when I ask for term position of one of the
terms (that I know is in position 3) I am getting a value of 43 returned.
 If I modify the data I am indexing and rebuild the index, it may cause
different values for this same term to be returned such as 20 or 21.

When I build the index using the SimpleText codec and  examine it, it shows
the position correctly at 3 for the same term.

Could there be fixes in later versions of Lucene that have fixed this and I
need to upgrade?  Or is there a bug lurking that under the right conditions
cause this problem to manifest itself?

for (int x = 0; x<postings.length; x++){
  DocsAndPositionsEnum posting = postings[x].postings;
  try {
int freq = posting.freq();
for (int y = 0; y<freq; y++){
int position = posting.nextPosition();
...

Re: Position problems in 4.3.0

Posted by Adrien Grand <jp...@gmail.com>.
Hi,

This looks bad! Can you write a small test case that reproduces the
issue so that we can try to understand what happens here?

Thanks!

-- 
Adrien

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