i am trying to debug a scoring issue, but i did not find a proper guide to
how one would read the explain results.
there is a query that has custom field boosts:
curl -X GET
"http://localhost:9200/test-headings/heading/_search?from=0&load=false&page=1&per_page=75&raw_hits=true&size=75&pretty=true"
-d
'{"from":0,"size":75,"query":{"query_string":{"query":"drehteile","fields":["hk_name_de^10","hk_name_split_de^4","hk_recombined_de","hk_manual_de","hk_manual_final_de^0.1","hk_adjectiv_de","hk_singplur_de","hk_synonym_de","hk_replaced_de","hk_adjectiv_enh_de","hk_sea_enh_de","hk_click_keywords_de^4.5"],"use_dis_max":false}},"filter":{"numeric_range":{"company_counts.DE.DE":{"gt":0}}}}'
i thought that the results would be sorted according to the ^X modifieres
like:
- hk_name_de => 10
- hk_click_keywords_de => 4.5
- hk_name_split_de => 4
- rest_de
- hk_manual_final_de => 0.1
unfortunately the results are not ordered that way. i tried playing around
with dismax settings, omit_norms etc, which had no effect on what i was
doing. my test-data just has one keyword, so the number or length should
not matter anyways.
the explain-query that i get has the following part:
{
"_shard" : 3,
"_node" : "dHiSD_vaR46-UaWAjI71JQ",
"_index" : "test-headings",
"_type" : "heading",
"_id" : "95",
"_score" : 0.049284987, "_source" : {"company_counts":{"DE":{"DE":100,
"AT":10,"CH":1},"AT":{"DE":2,"AT":50,"CH":10},"CH":{"DE":1,"AT":5,"CH":30}},
"hk_name_de":[],"hk_name_split_de":[],"hk_recombined_de":[],"hk_manual_de":[
"drehteile"],"hk_manual_final_de":[],"hk_adjectiv_de":[],"hk_singplur_de"
:[],"hk_synonym_de":[],"hk_replaced_de":[],"hk_adjectiv_enh_de":[],
"hk_sea_enh_de":[],"hk_name_en":[],"hk_name_split_en":[],"hk_recombined_en"
:[],"hk_manual_en":[],"hk_manual_final_en":[],"hk_adjectiv_en":[],
"hk_singplur_en":[],"hk_synonym_en":[],"hk_replaced_en":[],
"hk_adjectiv_enh_en":[],"hk_sea_enh_en":[],"hk_name_fr":[],
"hk_name_split_fr":[],"hk_recombined_fr":[],"hk_manual_fr":[],
"hk_manual_final_fr":[],"hk_adjectiv_fr":[],"hk_singplur_fr":[],
"hk_synonym_fr":[],"hk_replaced_fr":[],"hk_adjectiv_enh_fr":[],
"hk_sea_enh_fr":[],"hk_name_nl":[],"hk_name_split_nl":[],"hk_recombined_nl"
:[],"hk_manual_nl":[],"hk_manual_final_nl":[],"hk_adjectiv_nl":[],
"hk_singplur_nl":[],"hk_synonym_nl":[],"hk_replaced_nl":[],
"hk_adjectiv_enh_nl":[],"hk_sea_enh_nl":[],"name_de":"only_manual_drehteile"
,"id":"95"},
"highlight" : {
"hk_manual_de" : [ "drehteile" ]
},
"_explanation" : {
"value" : 0.049284987,
"description" : "sum of:",
"details" : [ {
"value" : 0.049284987,
"description" : "weight(hk_manual_de:drehteile in 1), product of:"
,
"details" : [ {
"value" : 0.049284987,
"description" : "queryWeight(hk_manual_de:drehteile), product
of:",
"details" : [ {
"value" : 1.0,
"description" : "idf(docFreq=1, maxDocs=2)"
}, {
"value" : 0.049284987,
"description" : "queryNorm"
} ]
}, {
"value" : 1.0,
"description" : "fieldWeight(hk_manual_de:drehteile in 1),
product of:",
"details" : [ {
"value" : 1.0,
"description" : "tf(termFreq(hk_manual_de:drehteile)=1)"
}, {
"value" : 1.0,
"description" : "idf(docFreq=1, maxDocs=2)"
}, {
"value" : 1.0,
"description" : "fieldNorm(field=hk_manual_de, doc=1)"
} ]
} ]
} ]
}
}, {
"_shard" : 2,
"_node" : "dHiSD_vaR46-UaWAjI71JQ",
"_index" : "test-headings",
"_type" : "heading",
"_id" : "94",
"_score" : 0.03306274, "_source" : {"company_counts":{"DE":{"DE":100,
"AT":10,"CH":1},"AT":{"DE":2,"AT":50,"CH":10},"CH":{"DE":1,"AT":5,"CH":30}},
"hk_name_de":[],"hk_name_split_de":["drehteile"],"hk_recombined_de":[],
"hk_manual_de":[],"hk_manual_final_de":[],"hk_adjectiv_de":[],
"hk_singplur_de":[],"hk_synonym_de":[],"hk_replaced_de":[],
"hk_adjectiv_enh_de":[],"hk_sea_enh_de":[],"hk_name_en":[],
"hk_name_split_en":[],"hk_recombined_en":[],"hk_manual_en":[],
"hk_manual_final_en":[],"hk_adjectiv_en":[],"hk_singplur_en":[],
"hk_synonym_en":[],"hk_replaced_en":[],"hk_adjectiv_enh_en":[],
"hk_sea_enh_en":[],"hk_name_fr":[],"hk_name_split_fr":[],"hk_recombined_fr"
:[],"hk_manual_fr":[],"hk_manual_final_fr":[],"hk_adjectiv_fr":[],
"hk_singplur_fr":[],"hk_synonym_fr":[],"hk_replaced_fr":[],
"hk_adjectiv_enh_fr":[],"hk_sea_enh_fr":[],"hk_name_nl":[],
"hk_name_split_nl":[],"hk_recombined_nl":[],"hk_manual_nl":[],
"hk_manual_final_nl":[],"hk_adjectiv_nl":[],"hk_singplur_nl":[],
"hk_synonym_nl":[],"hk_replaced_nl":[],"hk_adjectiv_enh_nl":[],
"hk_sea_enh_nl":[],"name_de":"only_split_drehteile","id":"94"},
"highlight" : {
"hk_name_split_de" : [ "drehteile" ]
},
"_explanation" : {
"value" : 0.03306274,
"description" : "sum of:",
"details" : [ {
"value" : 0.03306274,
"description" : "weight(hk_name_split_de:drehteile^4.0 in 0),
product of:",
"details" : [ {
"value" : 0.10774788,
"description" : "queryWeight(hk_name_split_de:drehteile^4.0),
product of:",
"details" : [ {
"value" : 4.0,
"description" : "boost"
}, {
"value" : 0.30685282,
"description" : "idf(docFreq=1, maxDocs=1)"
}, {
"value" : 0.08778466,
"description" : "queryNorm"
} ]
}, {
"value" : 0.30685282,
"description" : "fieldWeight(hk_name_split_de:drehteile in 0),
product of:",
"details" : [ {
"value" : 1.0,
"description" : "tf(termFreq(hk_name_split_de:drehteile)=1)"
}, {
"value" : 0.30685282,
"description" : "idf(docFreq=1, maxDocs=1)"
}, {
"value" : 1.0,
"description" : "fieldNorm(field=hk_name_split_de, doc=0)"
} ]
} ]
} ]
}
}
i was expecting hk_name_split_de to be scored higher than hk_manual_de:
weight(hk_manual_de:drehteile in 1) vs. weight(hk_name_split_de:drehteile^4.0
in 0)
any pointers why this is not working the way i was expecting?
--