How to fetch all hits in lucene.net
Asked Answered
R

2

5

I want to fetch all hits from lucene. Is there any wild card character which fetches all records?

Radiotelephony answered 24/9, 2009 at 15:0 Comment(2)
Show us what you've tried and describe how it hasn't worked, alternatively perhaps the Lucene documentation might be a good place to start?Struggle
Do you mean you want to return all documents from Lucene rather than all Hits?Struggle
S
10

Might this class in Lucene.Net serve your purpose? MatchAllDocsQuery

Struggle answered 24/9, 2009 at 15:7 Comment(0)
R
14

It worked. Thank You.

The code goes like this:

searcher = new Lucene.Net.Search.IndexSearcher(IndexPath);    
Lucene.Net.Search.MatchAllDocsQuery objMatchAll = new Lucene.Net.Search.MatchAllDocsQuery();    
Lucene.Net.Search.Hits hits = searcher.Search(objMatchAll);
Radiotelephony answered 24/9, 2009 at 16:5 Comment(0)
S
10

Might this class in Lucene.Net serve your purpose? MatchAllDocsQuery

Struggle answered 24/9, 2009 at 15:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.