I am creating a simple search form for our support ticket database using Lucene.Net, and I want to add the ability to filter, for example, to filter the results by ticket status. What is the best way to do this? As far as I can see, I have options:
- Include all terms that I want to filter in my index and filter using Lucene.Net
- Apply the filter after receiving the search results from Lucene, going to the database to filter the results that Lucene returned that are not valid for the filter.
Option 1 will increase the size of my index more and more for each additional field that I want to filter. Option 2, on the other hand, will increase the size of my index, cause problems when adding new fields for filtering, and also makes paging more difficult.
Is there an obvious choice here or a combination of both acceptable? (and is there a third option that I don't see?)
source
share