In my Lucene documents I have a field "company" where the company name is tokenized. I need the tokenization for a certain part of my application. But for this query, I need to be able to create a PrefixQuery over the whole company field.
Example:
- My Brand
- my
- brand
- brahmin farm
- brahmin
- farm
Regularly querying for "bra" would return both documents because they both have a term starting with bra.
The result I want though, would only return the last entry because the first term starts with bra.
Any suggestions?