lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: phrases
Date Wed, 17 Mar 2004 02:10:18 GMT
Try setting the slop factor on your phrase query.  This should 
accomplish what you want.  Set it to something like 10 and see what you 


On Mar 16, 2004, at 8:55 PM, Supun Edirisinghe wrote:

> I have a field called buisnessname and this field contains keywords 
> like
> "Georgian House" "Georgian" "The Georgian House Hotel" "Georgian blah
> blee bloo Hotel" along with 10,000s of other documents that have the
> word 'Hotel' somewhere in the businessname field.
> When I do a phrase query on "Georgian Hotel" I get only the one 
> document
> back. I would like to get that one back as the top result but also the
> other stuff that has "Georgian" and "Hotel" too. Also, I'd like to have
> "Georgian House Hotel" show up before "Georgian blah blee bloo Hotel"
> Right now I do an or'd boolean queary with
> each of the words in the the search string as a Term in business name
> as well as
> the entire search string as an exact PhraseQuery and boost that by 3.
> But this doesn't allow me to ensure that "The Georgian House Hotel" 
> will
> come before "Georgian blah blee bloo Hotel". (there are other fields
> queried besides business name) and in my instance of the index,
> "Georgian blah blee bloo Hotel" comes out with a better score because 
> of
> other fields). I would like the the closeness of the phrase to be taken
> into account. any ideas on constructing a good query for this 
> situation?
> thanks
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message