You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by sol myr <so...@gmail.com> on 2011/04/07 11:36:18 UTC

PhraseQuery with huge "slop"?

Hi,

I need to run and "AND" query with a twist: give higher ranking for
"exact match".
So when searching for  BIG BEN
- Give high rank for the Document  "BIG BEN is in London"
- Lower rank for  "It's a BIG day for my dear friend BEN"

Following good advice from this list, I combined 2 separate queries
(the query "+BIG +BEN"  and the exact-phrase "\"BIG BEN\"").
But someone suggested an alternative: PhraseQuery with a very large SLOP.
Such SLOP would cover all appearances of theses words in the document
(even far apart).
While the PrahseQuery would automatically give higher ranking when
words are close apart.

Does that make sense?

1) What SLOP is required if my documents are about 100 words each?
Is it simply SLOP=100, or would it be exponential ( like 100! )

2) Will I get reasonable performace?
Or would the large SLOP cause horrible performance degradation?

Thanks :)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org