0
각 문서에 대해 a
필드의 값을 반환하는 내 문서에 대한 사용자 지정 채점 기능을 만듭니다. 그러나 몇 가지 이유로 아래 예에서 결과의 _score
의 마지막 자릿수는 각 문서의 a
값의 마지막 자릿수와 다릅니다. 여기서 무슨 일이 일어나고있는거야?Elasticsearch의 사용자 지정 채점 기능이 예상 필드 값을 반환하지 않습니다.
{
"took": 16,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 984968060,
"hits": [
{
"_index": "test",
"_type": "doc",
"_id": "2",
"_score": 984968060,
"_source": {
"a": 984968088
}
},
{
"_index": "test",
"_type": "doc",
"_id": "1",
"_score": 851459200,
"_source": {
"a": 851459198
}
}
]
}
}
왜 분야 a
의 값보다 다르게 _score
입니다 : 다음 돌아갑니다
PUT test/doc/1
{
"a": 851459198
}
PUT test/doc/2
{
"a": 984968088
}
GET test/_search
{
"query": {
"function_score": {
"script_score": {
"script": {
"inline": "doc[\"a\"].value"
}
}
}
}
}
?
나는 득점, Elasticsearch 2.1.1