Nested field score problem


(Hilal) #1

I have an index:
PUT my_index2
{
"mappings": {
"my_type": {
"properties": {
"user": {
"type": "nested"
}
}
}
}
}

I added :
POST my_index2/my_type/
{
"user" : [
{
"name" : "Alice Don"
},{
"name" : "Don Bark"
}
]
}

and

POST my_index2/my_type/
{
"user" : [
{
"name" : "Alice School"
}
]
}

When I search it:
GET my_index2/_search
{
"query": {
"nested" : {
"path" : "user",
"score_mode" : "max",
"query" : {
"bool" : {
"must" : [
{ "match" : {"user.name" : "Alice"} }
]
}
}
}
}
}

The score of the first document one is higher but both has one "Alice" . How could that possible?


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.