lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <>
Subject Re: Exact string
Date Wed, 30 Apr 2008 12:03:09 GMT

On Apr 30, 2008, at 6:02 AM, WATHELET Thomas wrote:

> Hello,
> How can I procced to to find an exact string match in lucene with  
> somes articles in my search query.
> For exemple: if I search for "a ball" I just want results with a  
> ball and not "the ball" incled in the result?
> Is it possible to have a blank stop word list?

Yes.  Basically, you should index/query w/o stopwords and then you can  
issue a phrase query for "a ball" without any slop.  You could also  
try ngraming the words, such that you produce tokens like "a_ball",  
"the_ball" etc.  Just make sure your index time analysis matches up w/  
your query time analysis.  There are ngram Analyzers in the Lucene  
contrib/analyzer package.

> I have to set something special to my search query?
> I need help...
> Thanks in advence.
> <ittrad.bmp>
> Development Team
> Tel.: (+352) 4300 24752
> E-mail:

Grant Ingersoll

Lucene Helpful Hints:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message