5

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

IAdapter
  • 62,595
  • 73
  • 179
  • 242
Sunny
  • 297
  • 1
  • 4
  • 14
  • 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? – Lazarus Sep 24 '09 at 15:05
  • Do you mean you want to return all documents from Lucene rather than all Hits? – Lazarus Sep 24 '09 at 15:06

2 Answers2

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);
John x
  • 4,031
  • 8
  • 42
  • 67
Sunny
  • 297
  • 1
  • 4
  • 14
10

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

Lazarus
  • 41,906
  • 4
  • 43
  • 54