Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 941
Sunny Avatar asked Sep 24 '09 15:09

Sunny


2 Answers

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);
like image 133
Sunny Avatar answered Nov 14 '22 09:11

Sunny


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

like image 10
Lazarus Avatar answered Nov 14 '22 08:11

Lazarus