lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Atomic index/search for a phrase
Date Thu, 09 Mar 2006 10:56:03 GMT

On Mar 8, 2006, at 11:13 PM, Urvashi Gadi wrote:
> I am trying index and search a phrase (multiple words seperated by  
> spaces). How should i index it so that it remains atomic. I have  
> observed that if i index the phrase are keyword, lucene doesn't let  
> me retrive the phrase in search.

Please provide a simple example of how you're indexing and querying.

If you index "A Phrase" as untokenized, you would find it with a  
TermQuery for "A Phrase".  You must use exact case.  If you're using  
QueryParser, the text get analyzed and most analyzers lowercase.  If  
this expression is quoted it would become a PhraseQuery with two  
terms, or if it is unquoted it would become a BooleanQuery with two  
TermQuery clauses - either way it would not match if you indexed the  
phrase as untokenized.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message