Re: retrieving search matches with their frequency and positions

2023-07-10 Thread Mikhail Khludnev
OK https://lucene.apache.org/core/8_11_2/core/org/apache/lucene/search/Weight.html#matches-org.apache.lucene.index.LeafReaderContext-int- On Mon, Jul 10, 2023 at 2:08 PM nedyalko.zhe...@freelance.de.INVALID wrote: > Hi Mikhail, > > I don't see the matches `searcher.matches(topDocs.scoreDocs[i].

AW: retrieving search matches with their frequency and positions

2023-07-10 Thread nedyalko.zhe...@freelance.de.INVALID
Hi Mikhail, I don't see the matches `searcher.matches(topDocs.scoreDocs[i].doc, "fieldName", query);` method exposed. I'm using lucene core 8.11.2 and currently I cannot upgrade to 9.0.0 or later. Any ideas? Which API version are you referring to? Thanks. Ned V

Re: retrieving search matches with their frequency and positions

2023-07-10 Thread Mikhail Khludnev
Hi Ned. It's about TopDocs topDocs = searcher.search(query, 10); for (int i = 0; i < topDocs.scoreDocs.length; i++) { MatchesIterator matches = searcher.matches(topDocs.scoreDocs[i]. doc, "fieldName", query); while (matches.next()) { ... This is (almost) ho

AW: retrieving search matches with their frequency and positions

2023-07-10 Thread nedyalko.zhe...@freelance.de.INVALID
Hello Mikhail, Great, thanks for the very fast response! The link that you provided is very useful and informative. Though, I have an understanding issue. After I have searched for a search term, I get always TopDocs that represent the found documents. In my understanding there is no relation