Sunny
Sunny

Reputation: 287

How to fetch all hits in lucene.net

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

Upvotes: 5

Views: 3333

Answers (2)

Sunny
Sunny

Reputation: 287

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);

Upvotes: 14

Lazarus
Lazarus

Reputation: 43064

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

Upvotes: 10

Related Questions