Hi all.
I am implementing keyword search function. For this I have declared mapping
as following.
{
"fulltext":{
"_boost":{
"name":"weight",
"null_value":1.0
},
"properties":{
"musicId":{
"type":"integer",
"index":"not_analyzed",
"store":"true"
},
"title":{
"type":"string",
"index":"analyzed",
"store":"true",
"analyzer":"cjk"
},
"weight":{
"type":"double",
"index":"not_analyzed",
"store":"true"
}
}
}
}
Next, I have put as following docs.
musicId(1), title("あい"), weight(10)
musicId(2), title("あいあい"), weight(20)
musicId(3), title("あいあいあい"), weight(30)
musicId(4), title("あいあいあいあい"), weight(40)
When, then, I searched by the keyword 'あい', output was as following.
musicId=2
title=あいあい
weight=20.0
musicId=3
title=あいあいあい
weight=30.0
musicId=4
title=あいあいあいあい
weight=40.0
musicId=1
title=あい
weight=10.0
I expected a doc that has higher boost value will be matched at top but it
does not.
Give me some advice please.
Thanks for reading.
--
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.
For more options, visit https://groups.google.com/groups/opt_out.