Hi Chew,
with Lucene you could try the following:
Make one query for each single value in each category (each Term):
1Q - Gender:M
2Q - Department:Accounting
3Q - Department:R&D
4Q - ...
with a custom HitCollector like the following example taken from
org.apache.lucene.search.HitCollector AP
Hi,
you do not need to writer.close() the IndexWriter at all to make changes
visible.
When IndexWriter is constructed with autoCommit = true flag set,
calling writer.flush() will do.
This way you can keep your single IndexWriter at App-level handling all the
synchonization.
Have a look at
Hi Vijay,
with a frequent usage pattern of searching (exactly) for a whole fields
value (e.g. the whole name) it may be worth to store that field (name:)
twice:
1) as field name_tokenized: with Field.Index.TOKENIZED for normal
"contains" querys and
2) as field name_untokenized: with Field.Index.