Possible bug in TermInfosReader/Writer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible bug in TermInfosReader/Writer

Daniel Naber
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Possible bug in TermInfosReader/Writer

Paul Elschot
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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]