Hi Michael, You could replace this with *indexReader.storedFields().document(scoreDoc.doc)*
Docs - https://lucene.apache.org/core/9_7_0/core/org/apache/lucene/index/StoredFields.html#document(int) - Shubham On Mon, Sep 25, 2023 at 1:59 AM Michael Wechner <michael.wech...@wyona.com> wrote: > Hi > > I recently noctived that > > IndexReader.document(int) > > is deprecated, whereas my code is currently > > TopDocs topDocs = searcher.search(query, k); > for (ScoreDoc scoreDoc : topDocs.scoreDocs) { > Document doc = indexReader.document(scoreDoc.doc); > } > > How do I best replace document(int)? > > Thanks > > Michael > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >