Inconsistent scoring between nodes


(dunaeth) #1

Hi,

As seen with seeded random scoring (cf
. https://groups.google.com/forum/#!topic/elasticsearch/Nfds8K_yld8 ), I'm
having score consistency troubles with query string queries executed on a 2
node cluste (primary / replica) this time. I checked primary and replica
doc count on the queried index and they were the same. From what I see from
explained queries, scoring is computed from maxDocs shard metric instead of
a probably more suitable numDocs metric ? Or, should the difference in
maxDocs be indicative from a primary/replica failure (though the index
seems consistent) ?

Here the kind of query

POST http://127.0.0.1:9200/search_index/search_type/_search
{
"explain":true,
"fields":[
"id"
],
"sort":[
"_score",
"_id"
],
"query":{
"filtered":{
"query":{
"query_string":{
"analyzer":"francais",
"default_operator":"AND",
"query":"Brazilian"
}
},
"filter":{
"and":[
{
"range":{
"price":{
"gte":0,
"lte":49
}
}
},
{
"bool":{
"must":[
{
"in":{
"category":[
762,
678,
688,
689,
690,
691,
692,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
709,
710,
731,
756,
735,
736,
1059,
1060,
1070,
1071,
1085,
1086,
1087,
1089
]
}
}
]
}
}
]
}
}
},
"from":0,
"size":16
}

And the 2 different results i'm facing :

{
"took":12,
"timed_out":false,
"_shards":{
"total":4,
"successful":4,
"failed":0
},
"hits":{
"total":35,
"max_score":null,
"hits":[
{
"_shard":0,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245789",
"_score":1.0452316,
"fields":{
"id":[
"245789"
]
},
"sort":[
1.0452316,
null
],
"_explanation":{
"value":1.0452316,
"description":"weight(_all:brazilian in 2462)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0452316,
"description":"fieldWeight in 2462, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.912723,
"description":"idf(docFreq=214, maxDocs=29242)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2462)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245781",
"_score":1.0452316,
"fields":{
"id":[
"245781"
]
},
"sort":[
1.0452316,
null
],
"_explanation":{
"value":1.0452316,
"description":"weight(_all:brazilian in 2542)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0452316,
"description":"fieldWeight in 2542, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.912723,
"description":"idf(docFreq=214, maxDocs=29242)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2542)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245787",
"_score":1.0400058,
"fields":{
"id":[
"245787"
]
},
"sort":[
1.0400058,
null
],
"_explanation":{
"value":1.0400058,
"description":"weight(_all:brazilian in 1483)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0400058,
"description":"fieldWeight in 1483, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.883161,
"description":"idf(docFreq=210, maxDocs=27862)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1483)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245792",
"_score":1.0400058,
"fields":{
"id":[
"245792"
]
},
"sort":[
1.0400058,
null
],
"_explanation":{
"value":1.0400058,
"description":"weight(_all:brazilian in 1485)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0400058,
"description":"fieldWeight in 1485, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.883161,
"description":"idf(docFreq=210, maxDocs=27862)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1485)"
}
]
}
]
}
},
{
"_shard":1,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245788",
"_score":1.0392742,
"fields":{
"id":[
"245788"
]
},
"sort":[
1.0392742,
null
],
"_explanation":{
"value":1.0392742,
"description":"weight(_all:brazilian in 2974)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0392742,
"description":"score(doc=2974,freq=2.0 =
termFreq=2.0\n), product of:",
"details":[
{
"value":0.99999994,
"description":"queryWeight, product of:",
"details":[
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
{
"value":0.17009626,
"description":"queryNorm"
}
]
},
{
"value":1.0392743,
"description":"fieldWeight in 2974, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq
of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2974)"
}
]
}
]
}
]
}
},
{
"_shard":1,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245797",
"_score":1.0392742,
"fields":{
"id":[
"245797"
]
},
"sort":[
1.0392742,
null
],
"_explanation":{
"value":1.0392742,
"description":"weight(_all:brazilian in 2976)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0392742,
"description":"score(doc=2976,freq=2.0 =
termFreq=2.0\n), product of:",
"details":[
{
"value":0.99999994,
"description":"queryWeight, product of:",
"details":[
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
{
"value":0.17009626,
"description":"queryNorm"
}
]
},
{
"value":1.0392743,
"description":"fieldWeight in 2976, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq
of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2976)"
}
]
}
]
}
]
}
},
{
"_shard":1,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245784",
"_score":1.0392742,
"fields":{
"id":[
"245784"
]
},
"sort":[
1.0392742,
null
],
"_explanation":{
"value":1.0392742,
"description":"weight(_all:brazilian in 3032)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0392742,
"description":"score(doc=3032,freq=2.0 =
termFreq=2.0\n), product of:",
"details":[
{
"value":0.99999994,
"description":"queryWeight, product of:",
"details":[
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
{
"value":0.17009626,
"description":"queryNorm"
}
]
},
{
"value":1.0392743,
"description":"fieldWeight in 3032, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq
of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
{
"value":0.125,
"description":"fieldNorm(doc=3032)"
}
]
}
]
}
]
}
},
{
"_shard":3,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245786",
"_score":1.0282617,
"fields":{
"id":[
"245786"
]
},
"sort":[
1.0282617,
null
],
"_explanation":{
"value":1.0282617,
"description":"weight(_all:brazilian in 1476)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0282617,
"description":"fieldWeight in 1476, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8167267,
"description":"idf(docFreq=224, maxDocs=27801)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1476)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245791",
"_score":1.0282617,
"fields":{
"id":[
"245791"
]
},
"sort":[
1.0282617,
null
],
"_explanation":{
"value":1.0282617,
"description":"weight(_all:brazilian in 1478)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0282617,
"description":"fieldWeight in 1478, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8167267,
"description":"idf(docFreq=224, maxDocs=27801)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1478)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245782",
"_score":1.0282617,
"fields":{
"id":[
"245782"
]
},
"sort":[
1.0282617,
null
],
"_explanation":{
"value":1.0282617,
"description":"weight(_all:brazilian in 1547)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0282617,
"description":"fieldWeight in 1547, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8167267,
"description":"idf(docFreq=224, maxDocs=27801)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1547)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245790",
"_score":0.9145776,
"fields":{
"id":[
"245790"
]
},
"sort":[
0.9145776,
null
],
"_explanation":{
"value":0.9145776,
"description":"weight(_all:brazilian in 2464)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.9145776,
"description":"fieldWeight in 2464, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.912723,
"description":"idf(docFreq=214, maxDocs=29242)"
},
{
"value":0.109375,
"description":"fieldNorm(doc=2464)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245785",
"_score":0.9145776,
"fields":{
"id":[
"245785"
]
},
"sort":[
0.9145776,
null
],
"_explanation":{
"value":0.9145776,
"description":"weight(_all:brazilian in 2544)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.9145776,
"description":"fieldWeight in 2544, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.912723,
"description":"idf(docFreq=214, maxDocs=29242)"
},
{
"value":0.109375,
"description":"fieldNorm(doc=2544)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245783",
"_score":0.9100051,
"fields":{
"id":[
"245783"
]
},
"sort":[
0.9100051,
null
],
"_explanation":{
"value":0.9100051,
"description":"weight(_all:brazilian in 1481)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.9100051,
"description":"fieldWeight in 1481, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.883161,
"description":"idf(docFreq=210, maxDocs=27862)"
},
{
"value":0.109375,
"description":"fieldNorm(doc=1481)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245750",
"_score":0.7390904,
"fields":{
"id":[
"245750"
]
},
"sort":[
0.7390904,
null
],
"_explanation":{
"value":0.7390904,
"description":"weight(_all:brazilian in 2528)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.7390904,
"description":"fieldWeight in 2528, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":5.912723,
"description":"idf(docFreq=214, maxDocs=29242)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2528)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245754",
"_score":0.7390904,
"fields":{
"id":[
"245754"
]
},
"sort":[
0.7390904,
null
],
"_explanation":{
"value":0.7390904,
"description":"weight(_all:brazilian in 2530)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.7390904,
"description":"fieldWeight in 2530, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":5.912723,
"description":"idf(docFreq=214, maxDocs=29242)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2530)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245763",
"_score":0.7390904,
"fields":{
"id":[
"245763"
]
},
"sort":[
0.7390904,
null
],
"_explanation":{
"value":0.7390904,
"description":"weight(_all:brazilian in 2534)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.7390904,
"description":"fieldWeight in 2534, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":5.912723,
"description":"idf(docFreq=214, maxDocs=29242)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2534)"
}
]
}
]
}
}
]
}
}

{
"took":23,
"timed_out":false,
"_shards":{
"total":4,
"successful":4,
"failed":0
},
"hits":{
"total":35,
"max_score":null,
"hits":[
{
"_shard":2,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245787",
"_score":1.0395355,
"fields":{
"id":[
"245787"
]
},
"sort":[
1.0395355,
null
],
"_explanation":{
"value":1.0395355,
"description":"weight(_all:brazilian in 1407)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0395355,
"description":"fieldWeight in 1407, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8805013,
"description":"idf(docFreq=210, maxDocs=27788)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1407)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245792",
"_score":1.0395355,
"fields":{
"id":[
"245792"
]
},
"sort":[
1.0395355,
null
],
"_explanation":{
"value":1.0395355,
"description":"weight(_all:brazilian in 1409)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0395355,
"description":"fieldWeight in 1409, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8805013,
"description":"idf(docFreq=210, maxDocs=27788)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1409)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245781",
"_score":1.0389115,
"fields":{
"id":[
"245781"
]
},
"sort":[
1.0389115,
null
],
"_explanation":{
"value":1.0389115,
"description":"weight(_all:brazilian in 1671)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0389115,
"description":"fieldWeight in 1671, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.876971,
"description":"idf(docFreq=214, maxDocs=28215)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1671)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245789",
"_score":1.0389115,
"fields":{
"id":[
"245789"
]
},
"sort":[
1.0389115,
null
],
"_explanation":{
"value":1.0389115,
"description":"weight(_all:brazilian in 1675)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0389115,
"description":"fieldWeight in 1675, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.876971,
"description":"idf(docFreq=214, maxDocs=28215)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1675)"
}
]
}
]
}
},
{
"_shard":1,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245784",
"_score":1.029175,
"fields":{
"id":[
"245784"
]
},
"sort":[
1.029175,
null
],
"_explanation":{
"value":1.029175,
"description":"weight(_all:brazilian in 1583)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.029175,
"description":"fieldWeight in 1583, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.821893,
"description":"idf(docFreq=224, maxDocs=27945)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1583)"
}
]
}
]
}
},
{
"_shard":1,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245788",
"_score":1.029175,
"fields":{
"id":[
"245788"
]
},
"sort":[
1.029175,
null
],
"_explanation":{
"value":1.029175,
"description":"weight(_all:brazilian in 1585)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.029175,
"description":"fieldWeight in 1585, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.821893,
"description":"idf(docFreq=224, maxDocs=27945)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1585)"
}
]
}
]
}
},
{
"_shard":1,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245797",
"_score":1.029175,
"fields":{
"id":[
"245797"
]
},
"sort":[
1.029175,
null
],
"_explanation":{
"value":1.029175,
"description":"weight(_all:brazilian in 1587)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.029175,
"description":"fieldWeight in 1587, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.821893,
"description":"idf(docFreq=224, maxDocs=27945)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1587)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245791",
"_score":1.0281727,
"fields":{
"id":[
"245791"
]
},
"sort":[
1.0281727,
null
],
"_explanation":{
"value":1.0281727,
"description":"weight(_all:brazilian in 1456)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0281727,
"description":"fieldWeight in 1456, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.816223,
"description":"idf(docFreq=224, maxDocs=27787)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1456)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245782",
"_score":1.0281727,
"fields":{
"id":[
"245782"
]
},
"sort":[
1.0281727,
null
],
"_explanation":{
"value":1.0281727,
"description":"weight(_all:brazilian in 1483)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0281727,
"description":"fieldWeight in 1483, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.816223,
"description":"idf(docFreq=224, maxDocs=27787)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1483)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245786",
"_score":1.0281727,
"fields":{
"id":[
"245786"
]
},
"sort":[
1.0281727,
null
],
"_explanation":{
"value":1.0281727,
"description":"weight(_all:brazilian in 1485)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0281727,
"description":"fieldWeight in 1485, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.816223,
"description":"idf(docFreq=224, maxDocs=27787)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1485)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245783",
"_score":0.9095936,
"fields":{
"id":[
"245783"
]
},
"sort":[
0.9095936,
null
],
"_explanation":{
"value":0.9095936,
"description":"weight(_all:brazilian in 1441)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.9095936,
"description":"fieldWeight in 1441, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8805013,
"description":"idf(docFreq=210, maxDocs=27788)"
},
{
"value":0.109375,
"description":"fieldNorm(doc=1441)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245785",
"_score":0.90904754,
"fields":{
"id":[
"245785"
]
},
"sort":[
0.90904754,
null
],
"_explanation":{
"value":0.90904754,
"description":"weight(_all:brazilian in 1673)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.90904754,
"description":"fieldWeight in 1673, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.876971,
"description":"idf(docFreq=214, maxDocs=28215)"
},
{
"value":0.109375,
"description":"fieldNorm(doc=1673)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245790",
"_score":0.90904754,
"fields":{
"id":[
"245790"
]
},
"sort":[
0.90904754,
null
],
"_explanation":{
"value":0.90904754,
"description":"weight(_all:brazilian in 1677)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.90904754,
"description":"fieldWeight in 1677, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.876971,
"description":"idf(docFreq=214, maxDocs=28215)"
},
{
"value":0.109375,
"description":"fieldNorm(doc=1677)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245761",
"_score":0.73506266,
"fields":{
"id":[
"245761"
]
},
"sort":[
0.73506266,
null
],
"_explanation":{
"value":0.73506266,
"description":"weight(_all:brazilian in 1429)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.73506266,
"description":"fieldWeight in 1429, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":5.8805013,
"description":"idf(docFreq=210, maxDocs=27788)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1429)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245778",
"_score":0.73506266,
"fields":{
"id":[
"245778"
]
},
"sort":[
0.73506266,
null
],
"_explanation":{
"value":0.73506266,
"description":"weight(_all:brazilian in 1439)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.73506266,
"description":"fieldWeight in 1439, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":5.8805013,
"description":"idf(docFreq=210, maxDocs=27788)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1439)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245734",
"_score":0.73506266,
"fields":{
"id":[
"245734"
]
},
"sort":[
0.73506266,
null
],
"_explanation":{
"value":0.73506266,
"description":"weight(_all:brazilian in 1455)
[PerFieldSimilarity], result of:",
"details":[
{
"value":0.73506266,
"description":"fieldWeight in 1455, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":5.8805013,
"description":"idf(docFreq=210, maxDocs=27788)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1455)"
}
]
}
]
}
}
]
}
}

Here is the index status :

GET http://127.0.0.1:9200/search_index/_status
{
"_shards":{
"total":8,
"successful":8,
"failed":0
},
"indices":{
"search_index":{
"index":{
"primary_size_in_bytes":100678432,
"size_in_bytes":200110075
},
"translog":{
"operations":6175
},
"docs":{
"num_docs":102241,
"max_doc":113426,
"deleted_docs":11185
},
"merges":{
"current":0,
"current_docs":0,
"current_size_in_bytes":0,
"total":574,
"total_time_in_millis":2591697,
"total_docs":1674372,
"total_size_in_bytes":1385980062
},
"refresh":{
"total":2806868,
"total_time_in_millis":99504055
},
"flush":{
"total":16933,
"total_time_in_millis":375312
},
"shards":{
"0":[
{
"routing":{
"state":"STARTED",
"primary":true,
"node":"RB292EfbSMGTcy3CkhTywg",
"relocating_node":null,
"shard":0,
"index":"search_index"
},
"state":"STARTED",
"index":{
"size_in_bytes":24892432
},
"translog":{
"id":1378127632484,
"operations":773
},
"docs":{
"num_docs":25742,
"max_doc":28205,
"deleted_docs":2463
},
"merges":{
"current":0,
"current_docs":0,
"current_size_in_bytes":0,
"total":69,
"total_time_in_millis":442594,
"total_docs":133839,
"total_size_in_bytes":113498069
},
"refresh":{
"total":340345,
"total_time_in_millis":22955300
},
"flush":{
"total":2119,
"total_time_in_millis":62859
}
},
{
"routing":{
"state":"STARTED",
"primary":false,
"node":"O44znj24Q0iG8YWPmdJH6w",
"relocating_node":null,
"shard":0,
"index":"search_index"
},
"state":"STARTED",
"index":{
"size_in_bytes":26360147
},
"translog":{
"id":1378127632487,
"operations":765
},
"docs":{
"num_docs":25742,
"max_doc":29232,
"deleted_docs":3490
},
"merges":{
"current":0,
"current_docs":0,
"current_size_in_bytes":0,
"total":75,
"total_time_in_millis":40698,
"total_docs":322315,
"total_size_in_bytes":267468578
},
"refresh":{
"total":361111,
"total_time_in_millis":1911696
},
"flush":{
"total":2122,
"total_time_in_millis":30749
}
}
],
"1":[
{
"routing":{
"state":"STARTED",
"primary":true,
"node":"RB292EfbSMGTcy3CkhTywg",
"relocating_node":null,
"shard":1,
"index":"search_index"
},
"state":"STARTED",
"index":{
"size_in_bytes":26948359
},
"translog":{
"id":1378127632138,
"operations":777
},
"docs":{
"num_docs":25583,
"max_doc":29576,
"deleted_docs":3993
},
"merges":{
"current":0,
"current_docs":0,
"current_size_in_bytes":0,
"total":68,
"total_time_in_millis":604379,
"total_docs":174836,
"total_size_in_bytes":146283415
},
"refresh":{
"total":340417,
"total_time_in_millis":22956850
},
"flush":{
"total":2113,
"total_time_in_millis":64207
}
},
{
"routing":{
"state":"STARTED",
"primary":false,
"node":"O44znj24Q0iG8YWPmdJH6w",
"relocating_node":null,
"shard":1,
"index":"search_index"
},
"state":"STARTED",
"index":{
"size_in_bytes":24513609
},
"translog":{
"id":1378127632144,
"operations":769
},
"docs":{
"num_docs":25583,
"max_doc":27933,
"deleted_docs":2350
},
"merges":{
"current":0,
"current_docs":0,
"current_size_in_bytes":0,
"total":75,
"total_time_in_millis":23911,
"total_docs":195068,
"total_size_in_bytes":157220224
},
"refresh":{
"total":361058,
"total_time_in_millis":1905871
},
"flush":{
"total":2119,
"total_time_in_millis":30976
}
}
],
"2":[
{
"routing":{
"state":"STARTED",
"primary":true,
"node":"RB292EfbSMGTcy3CkhTywg",
"relocating_node":null,
"shard":2,
"index":"search_index"
},
"state":"STARTED",
"index":{
"size_in_bytes":24443816
},
"translog":{
"id":1378127632496,
"operations":772
},
"docs":{
"num_docs":25485,
"max_doc":27854,
"deleted_docs":2369
},
"merges":{
"current":0,
"current_docs":0,
"current_size_in_bytes":0,
"total":68,
"total_time_in_millis":717276,
"total_docs":187493,
"total_size_in_bytes":155673977
},
"refresh":{
"total":340226,
"total_time_in_millis":23022137
},
"flush":{
"total":2105,
"total_time_in_millis":64044
}
},
{
"routing":{
"state":"STARTED",
"primary":false,
"node":"O44znj24Q0iG8YWPmdJH6w",
"relocating_node":null,
"shard":2,
"index":"search_index"
},
"state":"STARTED",
"index":{
"size_in_bytes":24207086
},
"translog":{
"id":1378127632492,
"operations":783
},
"docs":{
"num_docs":25485,
"max_doc":27780,
"deleted_docs":2295
},
"merges":{
"current":0,
"current_docs":0,
"current_size_in_bytes":0,
"total":75,
"total_time_in_millis":27638,
"total_docs":233007,
"total_size_in_bytes":193595679
},
"refresh":{
"total":360743,
"total_time_in_millis":1922447
},
"flush":{
"total":2101,
"total_time_in_millis":31535
}
}
],
"3":[
{
"routing":{
"state":"STARTED",
"primary":true,
"node":"RB292EfbSMGTcy3CkhTywg",
"relocating_node":null,
"shard":3,
"index":"search_index"
},
"state":"STARTED",
"index":{
"size_in_bytes":24393825
},
"translog":{
"id":1378127632201,
"operations":768
},
"docs":{
"num_docs":25431,
"max_doc":27791,
"deleted_docs":2360
},
"merges":{
"current":0,
"current_docs":0,
"current_size_in_bytes":0,
"total":69,
"total_time_in_millis":701603,
"total_docs":180797,
"total_size_in_bytes":149559131
},
"refresh":{
"total":341163,
"total_time_in_millis":22915778
},
"flush":{
"total":2126,
"total_time_in_millis":61211
}
},
{
"routing":{
"state":"STARTED",
"primary":false,
"node":"O44znj24Q0iG8YWPmdJH6w",
"relocating_node":null,
"shard":3,
"index":"search_index"
},
"state":"STARTED",
"index":{
"size_in_bytes":24350801
},
"translog":{
"id":1378127632203,
"operations":768
},
"docs":{
"num_docs":25431,
"max_doc":27777,
"deleted_docs":2346
},
"merges":{
"current":0,
"current_docs":0,
"current_size_in_bytes":0,
"total":75,
"total_time_in_millis":33598,
"total_docs":247017,
"total_size_in_bytes":202680989
},
"refresh":{
"total":361805,
"total_time_in_millis":1913976
},
"flush":{
"total":2128,
"total_time_in_millis":29731
}
}
]
}
}
}
}

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c6306eaf-a604-45af-a2c0-5b84279d7cf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(dunaeth) #2

It seems the solution to inconsistent scoring is to set the shard replica
to execute the search request on per user basis using the preference
request parameter. Though, I still wonder why maxDocs is prefered than
numDocs to calculate docs scoring.

Le mercredi 23 juillet 2014 10:55:54 UTC+2, Dunaeth a écrit :

Hi,

As seen with seeded random scoring (cf .
https://groups.google.com/forum/#!topic/elasticsearch/Nfds8K_yld8 ), I'm
having score consistency troubles with query string queries executed on a 2
node cluste (primary / replica) this time. I checked primary and replica
doc count on the queried index and they were the same. From what I see from
explained queries, scoring is computed from maxDocs shard metric instead of
a probably more suitable numDocs metric ? Or, should the difference in
maxDocs be indicative from a primary/replica failure (though the index
seems consistent) ?

Here the kind of query

POST http://127.0.0.1:9200/search_index/search_type/_search
{
"explain":true,
"fields":[
"id"
],
"sort":[
"_score",
"_id"
],
"query":{
"filtered":{
"query":{
"query_string":{
"analyzer":"francais",
"default_operator":"AND",
"query":"Brazilian"
}
},
"filter":{
"and":[
{
"range":{
"price":{
"gte":0,
"lte":49
}
}
},
{
"bool":{
"must":[
{
"in":{
"category":[
762,
678,
688,
689,
690,
691,
692,
693,
694,
695,
696,
697,
698,
699,
700,
701,
702,
703,
704,
705,
706,
709,
710,
731,
756,
735,
736,
1059,
1060,
1070,
1071,
1085,
1086,
1087,
1089
]
}
}
]
}
}
]
}
}
},
"from":0,
"size":16
}

And the 2 different results i'm facing :

{
"took":12,
"timed_out":false,
"_shards":{
"total":4,
"successful":4,
"failed":0
},
"hits":{
"total":35,
"max_score":null,
"hits":[
{
"_shard":0,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245789",
"_score":1.0452316,
"fields":{
"id":[
"245789"
]
},
"sort":[
1.0452316,
null
],
"_explanation":{
"value":1.0452316,
"description":"weight(_all:brazilian in 2462)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0452316,
"description":"fieldWeight in 2462, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.912723,
"description":"idf(docFreq=214, maxDocs=29242)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2462)"
}
]
}
]
}
},
{
"_shard":0,
"_node":"O44znj24Q0iG8YWPmdJH6w",
"_index":"search_index",
"_type":"search_type",
"_id":"245781",
"_score":1.0452316,
"fields":{
"id":[
"245781"
]
},
"sort":[
1.0452316,
null
],
"_explanation":{
"value":1.0452316,
"description":"weight(_all:brazilian in 2542)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0452316,
"description":"fieldWeight in 2542, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.912723,
"description":"idf(docFreq=214, maxDocs=29242)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2542)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245787",
"_score":1.0400058,
"fields":{
"id":[
"245787"
]
},
"sort":[
1.0400058,
null
],
"_explanation":{
"value":1.0400058,
"description":"weight(_all:brazilian in 1483)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0400058,
"description":"fieldWeight in 1483, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.883161,
"description":"idf(docFreq=210, maxDocs=27862)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1483)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245792",
"_score":1.0400058,
"fields":{
"id":[
"245792"
]
},
"sort":[
1.0400058,
null
],
"_explanation":{
"value":1.0400058,
"description":"weight(_all:brazilian in 1485)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0400058,
"description":"fieldWeight in 1485, product of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.883161,
"description":"idf(docFreq=210, maxDocs=27862)"
},
{
"value":0.125,
"description":"fieldNorm(doc=1485)"
}
]
}
]
}
},
{
"_shard":1,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245788",
"_score":1.0392742,
"fields":{
"id":[
"245788"
]
},
"sort":[
1.0392742,
null
],
"_explanation":{
"value":1.0392742,
"description":"weight(_all:brazilian in 2974)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0392742,
"description":"score(doc=2974,freq=2.0 =
termFreq=2.0\n), product of:",
"details":[
{
"value":0.99999994,
"description":"queryWeight, product of:",
"details":[
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
{
"value":0.17009626,
"description":"queryNorm"
}
]
},
{
"value":1.0392743,
"description":"fieldWeight in 2974, product
of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq
of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
{
"value":0.125,
"description":"fieldNorm(doc=2974)"
}
]
}
]
}
]
}
},
{
"_shard":1,
"_node":"RB292EfbSMGTcy3CkhTywg",
"_index":"search_index",
"_type":"search_type",
"_id":"245797",
"_score":1.0392742,
"fields":{
"id":[
"245797"
]
},
"sort":[
1.0392742,
null
],
"_explanation":{
"value":1.0392742,
"description":"weight(_all:brazilian in 2976)
[PerFieldSimilarity], result of:",
"details":[
{
"value":1.0392742,
"description":"score(doc=2976,freq=2.0 =
termFreq=2.0\n), product of:",
"details":[
{
"value":0.99999994,
"description":"queryWeight, product of:",
"details":[
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
{
"value":0.17009626,
"description":"queryNorm"
}
]
},
{
"value":1.0392743,
"description":"fieldWeight in 2976, product
of:",
"details":[
{
"value":1.4142135,
"description":"tf(freq=2.0), with freq
of:",
"details":[
{
"value":2.0,
"description":"termFreq=2.0"
}
]
},
{
"value":5.8790236,
"description":"idf(docFreq=224,
maxDocs=29588)"
},
&
...

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/68e62613-a44f-4d4e-90a7-f610c5d6d24a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3