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 Bruno René Santos <br...@gmail.com> on 2013/09/05 13:07:49 UTC

Tweaking Edismax on the Phrase Fields

Hi,

I have a doubt about the raw query that is parsed from a edismax query.
Form example the query:

_query_:"{!edismax mm=100% bf='log(div(9900,producttier))'
pf='name_synonyms~100^3 name~100^6 heading~100^20' pf2='name_synonyms~100^3
name~100^6 heading~100^20' qf='name_synonyms^3 name^6 heading^20'}hotel
centro lisboa"

is transformed into


(+((DisjunctionMaxQuery((name_synonyms:hotel^3.0 | heading:hotel^20.0
| name:hotel^6.0)) DisjunctionMaxQuery((((name_synonyms:semtr
name_synonyms:centr)^3.0) | ((heading:semtr heading:centr)^20.0) |
((name:semtr name:centr)^6.0)))
DisjunctionMaxQuery((((name_synonyms:lisbon name_synonyms:lisbo)^3.0)
| ((heading:lisbon heading:lisbo)^20.0) | ((name:lisbon
name:lisbo)^6.0))))~3) DisjunctionMaxQuery((name_synonyms:\"hotel
(semtr centr) (lisbon lisbo)\"~100^3.0))
DisjunctionMaxQuery((name:\"hotel (semtr centr) (lisbon
lisbo)\"~100^6.0)) DisjunctionMaxQuery((heading:\"hotel (semtr centr)
(lisbon lisbo)\"~100^20.0))
(DisjunctionMaxQuery((name_synonyms:\"hotel (semtr centr)\"~100^3.0))
DisjunctionMaxQuery((name_synonyms:\"(semtr centr) (lisbon
lisbo)\"~100^3.0))) (DisjunctionMaxQuery((name:\"hotel (semtr
centr)\"~100^6.0)) DisjunctionMaxQuery((name:\"(semtr centr) (lisbon
lisbo)\"~100^6.0))) (DisjunctionMaxQuery((heading:\"hotel (semtr
centr)\"~100^20.0)) DisjunctionMaxQuery((heading:\"(semtr centr)
(lisbon lisbo)\"~100^20.0)))
FunctionQuery(log(div(const(9900),int(producttier)))))/no_coord

As you can see for each field on a phrase query a new
DisjunctionMaxQuery is created. Why the behaviour is not same as the
qf? On the qf the most important field (max) is what is counts. on the
phrase query all fields participate on the final score. Is there any
way to emulate the qf behaviour of the qf (one DisjunctionMaxQuery for
each combination) on the pf? like one DisjunctionMaxQuery for pf,
another for the pf2, etc

Regards

Bruno

-- 

Bruno René Santos
Lisboa - Portugal