1、新建测试用索引,定制similarity:
PUT testbm
{
"settings": {
"similarity":{
"my_similarity":{
"type":"BM25",
"b":0,
"k1":2
}
},
"number_of_replicas": 0,
"number_of_shards": 1
},
"mappings": {
"properties": {
"content":{
"type": "text",
"similarity": "my_similarity"
}
}
}
}
2、添加测试数据,发现参数b,k1仍为默认值
{
"value" : 1.2,
"description" : "k1, term saturation parameter",
"details" : [ ]
},
{
"value" : 0.75,
"description" : "b, length normalization parameter",
"details" : [ ]
}
3、新手入门,正在学习,不知道哪里出了错,还请大佬们给解答一下~
PUT testbm
{
"settings": {
"similarity":{
"my_similarity":{
"type":"BM25",
"b":0,
"k1":2
}
},
"number_of_replicas": 0,
"number_of_shards": 1
},
"mappings": {
"properties": {
"content":{
"type": "text",
"similarity": "my_similarity"
}
}
}
}
2、添加测试数据,发现参数b,k1仍为默认值
{
"value" : 1.2,
"description" : "k1, term saturation parameter",
"details" : [ ]
},
{
"value" : 0.75,
"description" : "b, length normalization parameter",
"details" : [ ]
}
3、新手入门,正在学习,不知道哪里出了错,还请大佬们给解答一下~
1 个回复
locatelli
赞同来自:
^^^ 应该会显示当前的index setting