You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Polina Litvak <pl...@casebank.com> on 2004/07/07 22:19:40 UTC

Problem with match on a non tokenized field.

I have a Lucene Document with a field named Code which is stored 
and indexed but not tokenized. The value of the field is ABC5-LB.
The only way I can match the field when searching is by entering 
Code:"ABC5-LB" because when I drop the quotes, every Analyzer I've tried
using breaks my
query into Code:ABC5 -Code:LB.
 
I need to be able to match this field by doing something like
Code:ABC5-L*, therefore always using quotes is not an option.
 
How would I go about writing my own analyzer that will not tokenize the
query ?
 
Thanks,
Polina