You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Marc Sturlese <ma...@gmail.com> on 2010/03/11 17:42:16 UTC
What does means ~2, ~3, ~4 in DisjunctionMaxQuery?
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)
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)
I have tryed to read carefully lucene documentation of DisjunctionMaxQuery
but can't find what ~2 (for the first query) and ~3 (for the second query)
do. In case I search for 4 words it will be ~4
I know ~ its used to specify the slop in phrase queries. Does it means any
sort of slope here in the DisjunctionMaxQueries??
Thanks in advance
--
View this message in context: http://old.nabble.com/What-does-means-%7E2%2C-%7E3%2C-%7E4-in-DisjunctionMaxQuery--tp27866033p27866033.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: What does means ~2, ~3, ~4 in DisjunctionMaxQuery?
Posted by Erik Hatcher <er...@gmail.com>.
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