lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dwaipayan Roy <>
Subject Re: getting Lucene Docid from inside score()
Date Fri, 09 Mar 2018 11:48:22 GMT
Thank you very much for your reply. Yes, I really want this (for
implementing a retrieval function that extends the LMDir function).
Precisely, I want the document numbering same as that we see in
Lucene-Index-Viewers like Luke.

I am not sure what you meant by "segment offset, held by a leaf reader"..
Can you please explain a little, exactly when and what I need to do?

Many thanks.

On 2018/03/09 11:25:44, Michael Sokolov <> wrote:
> Are you sure you want this? Lucene docids aren't generally useful outside
> narrow internal context. They can change over time for example.>
> But if you do, it sounds like maybe what you are seeing is the per
> docid. To get a global one you have to add the segment offset, held by a>
> leaf reader.>
> On Mar 9, 2018 5:06 AM, "Dwaipayan Roy" <> wrote:>
> > While searching, I want to get the lucene assigned docid (that starts
> > 0 to the number of documents -1) of a document having a particular
> > term.>
> >>
> > From inside the score(), printing 'doc' or calling docId() is returning
> > docid which, I think, is the internal docid of a segment in which the>
> > document is indexed. However, I want to have the lucene assigned docid.
> > to do that?>
> >>
> > Dwaipayan..>
> >>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message