You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Daniel Naber <lu...@danielnaber.de> on 2005/06/05 16:34:30 UTC

Possible bug in TermInfosReader/Writer

Hi,

I don't understand this code:

if (ti.docFreq >= skipInterval)
  output.writeVInt(ti.skipOffset);

What does the skipInterval have to do with the document frequency? 
Shouldn't that be something like if (i % skipInterval == 0), so that the 
skip information is written regularly?

Opinions?

Regards
 Daniel

-- 
http://www.danielnaber.de

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


Re: Possible bug in TermInfosReader/Writer

Posted by Paul Elschot <pa...@xs4all.nl>.
On Sunday 05 June 2005 16:34, Daniel Naber wrote:
> Hi,
> 
> I don't understand this code:
> 
> if (ti.docFreq >= skipInterval)
>   output.writeVInt(ti.skipOffset);
> 
> What does the skipInterval have to do with the document frequency? 

> Shouldn't that be something like if (i % skipInterval == 0), so that the 
> skip information is written regularly?
> 
> Opinions?

This skipping is probably for the first skipping within the docs of a term. 
The later skip info is written here in SegmentMerger line 337,
method appendPostings():

        if ((df % skipInterval) == 0) {
          bufferSkip(lastDoc);
        }

Regards,
Paul Elschot.

> 
> Regards
>  Daniel
> 
> -- 
> http://www.danielnaber.de
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
> 
> 
> 


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