4

I am using lucene search to get bucket items filtered by some string and this is my code:

var innerQuery = new FullTextQuery(myString);
                    var hits = searchContext.Search(innerQuery, searchIndex.GetDocumentCount());

Is there some query or something different that will let me get all indexed items? I tried with empty "myString" but there is an error that it cannot be empty.

1 Answer 1

2

You can use Lucene.Net.Search.MatchAllDocsQuery:

SearchHits hits = searchContext.Search(new MatchAllDocsQuery(), int.MaxValue);
1
  • Thanks for help :)
    – petros
    Commented Apr 11, 2016 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.