lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Korcynski <>
Subject exact match on a stored / tokenized field.
Date Wed, 13 May 2009 14:05:48 GMT

I have fields that are stored and tokenized, I've indexed using the 
StandardAnalyzer.  Now I'm trying to do an exact string match.  For 
example, my document has two fields:

chunk.12     rights regarding immigration. Unlike other Latin Americans, 
Puerto Ricans are US. citizens. The right
chunk.2       the Latin School for collaborating with us, especially 
Maira Perez and Melissa Lee. They have

I want to do an exact string search for "Latin School" and have it 
return me chunk.2 as part of the results but not chunk.12.  Now, it 
would seem that this wouldn't be possible because of the tokenization.  
So my initial inclination was to store the fields as both tokenized and 
untokenized so that I could do an exact match against the untokenized 
fields.  However since wild card searches can't start with *, I can't do 
*Latin School* and so I can't figure out how I'd get chunk.2 to return 
when they're untokenized?   Is there a best practice or a generic deisgn 
pattern to follow for setting up for your index to allow for exact 

Any help would be appreciated.



View raw message