lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhang, Lisheng" <>
Subject RE: lucene 3.0.3 | phrase query problem
Date Fri, 11 Feb 2011 13:14:37 GMT
Hi Kumar,

1) For your question in last mail: for tool luke, go to site
and click "launch luke now", then pointing to your lucene data folder. Also the book
"Lucene in Action" is a great source (go to and search this book) where
everything (almost) is explained.

2) For analyzers, to make sure that analyzer is used only when we use QueryParser, I did
not test but from source code I think WhitespaceAnalyzer should pick up "SQL Server 2005/2000/CE"

if we index this phrase into myfield and use a query string as 

myfield:"SQL Server 2005/2000/CE"

to feed into QueryParser. If we create lucene Query object directly like TermQuery, then the
QueryParser is not used.

Best regards, Lisheng

-----Original Message-----
From: Ranjit Kumar []
Sent: Thursday, February 10, 2011 10:41 PM
Subject: lucene 3.0.3 | phrase query problem

Hi Anshum,

Thanks for your replay..

Yes, I am agree with you.

As right now, I am using StandardAnalyzer it remove stop words, Puts text in lowercase and
do not create index for most common word in English.

        Searching on index created by StandardAnalyzer it gives result as discussed.

In case of SimpleAnalyzer while indexing it puts text in lowercase, also ignore stop words.

        Searching on index created by SimpleAnalyzer it gives result like StandardAnalyzer.
But, also give result for most common words.

While using WhitespaceAnalyzer for indexing it Splits tokens at whitespace.

        Searching on index created by WhitespaceAnalyzer it gives result better and do not
gives result for "sql. Resver"

But also do not gives result for "SQL Server 2005/2000/CE" which is not correct.

Can you suggest me analyzer that works properly with this condition.

Thanks & Regards,
Ranjit Kumar
Private, Confidential and Privileged. This e-mail and any files and attachments transmitted
with it are confidential and/or privileged. They are intended solely for the use of the intended
recipient. The content of this e-mail and any file or attachment transmitted with it may have
been changed or altered without the consent of the author. If you are not the intended recipient,
please note that any review, dissemination, disclosure, alteration, printing, circulation
or Transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited
and may be unlawful. If you have received this e-mail or any file or attachment transmitted
with it in error please notify OTS Solutions at ===================================================================================================

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

View raw message