Aşağıdaki gibi çalışmayı destekleyen popülerlik elde etmeye çalışıyorum. Ben ElasticSearch ait 2.0.2 sürümünü kullanmakPopülerlik hatasını "Alan [x] için eksik değer" olarak yükseltme
{
"query": {
"function_score": {
"query": {
"bool": {
"should": [
{
"multi_match": {
"type": "best_fields",
"query": "search",
"fields": [
"Name^7",
"ShortDescription^6"
]
}
}
]
}
},
"field_value_factor": {
"field": "OrderCount"
}
}
}
}
Ben sorgusu ile kontrol
"error": {
"root_cause": [
{
"type": "exception",
"reason": "Missing value for field [OrderCount]"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
olarak OrderCount asla boş değil, 0, i alıyorum hata mesajı olmasına rağmen herhangi bir boş değer yoksa ancak sorgu sonuç döndürmez.
{
"query": {
"filtered": {
"filter": {
"missing": {
"field": "OrderCount"
}
}
}
}
}
Hatta "null_value" set çalıştı: 0 aşağıda ama yine de ben bile aşağıda aşağıdaki filtreli benim sorgu genişletilmiş ama hata eşik olan bu hata mesajını
},
"OrderCount": {
"null_value": 0,
"index": "no",
"store": true,
"type": "integer"
},
alma.
"functions": [
{
"filter":{
"exists":{
"field":"OrderCount"
}
},
"field_value_factor": {
"field": "OrderCount"
}
}
}
Sorun ne olabilir? Baska öneri?