lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <erik.hatc...@gmail.com>
Subject Re: What does means ~2, ~3, ~4 in DisjunctionMaxQuery?
Date Thu, 11 Mar 2010 16:53:19 GMT

On Mar 11, 2010, at 11:42 AM, Marc Sturlese wrote:
> I am debuggin a 2 words query build using dismax. So it's build from
> DisjunctionMaxQueries being the minShouldMatch 100% and tie breaker
> multiplier = 0.3
>
> +((DisjunctionMaxQuery((content:john | title:john~0.3)
> DisjunctionMaxQuery((content:malone | title:malone)~0.3))~2)

the ~2 is BooleanQuery's way of saying the minimum number that should  
match value.

>
> And a 3 words one (with same tie and mm):
> +((DisjunctionMaxQuery((content:john^3.0 | region:john)~0.3)
> DisjunctionMaxQuery((content:malone^3.0 | region:malone)~0.3)
> DisjunctionMaxQuery((content:lawyer^3.0 | region:lawyer)~0.3))~3)

And likewise for ~3 here.  It's being computed based on the mm  
parameter you're providing, which is 100%.

> I know ~ its used to specify the slop in phrase queries. Does it  
> means any
> sort of slope here in the DisjunctionMaxQueries??

It's actually purely on the BooleanQuery for that factor.

	Erik


Mime
View raw message