Plat wrote:
Basically, pretend I do a regular search for "category:fiction". After
stemming/etc, this would match any Document with a category of
"fiction", "non-fiction", "fictitious", etc. All 900+ of them.
BUT as far as the results are concerned, I'm not actually interested
in each Document that was hit, nor about any other field besides the
"category" field. I just want a list of the unique categories that
matched the search string of "fiction".
...
Again, I want to find a *unique* list of "category" field values that
match certain query text.
I know this can be done using a second index, but wanted to be sure
there isn't an obvious, less-hacky way first. I'm used to Lucene
surprising me with sneaky efficiencies.
Ah, yes, I misunderstood what you are trying to do. How about doing a
simple string search (like String.indexOf) on the contents of a TermEnum
from IndexReader.terms()? Since you've only got a few thousand distinct
values, that should be pretty fast.
--MDC
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]