0
votes

I have some "refresh" problem with ElasticSearch v6.2.1.

Given an index "my_index" and a type "my_type", this is the scenario :

Step 1: Launch query that returns the 50 first documents where some fields (id, address, information) match with term parameter (e.g PARIS)

The result:

DOC1, DOC2, DOC3, DOC4, ... DOC50

Step 2: Update DOC1 phoneNumber field with query (/my_index/my_type/DOC1/_update)

Step 3: Relaunch step 1 query.

The result:

DOC2, DOC3, DOC4, DOC5, ... DOC1 (29th place), .... DOC50

As we can see, my modified document is moved to the 29th place. My question is why my document does not take the same place, knowing that phoneNumber is not considered in my search.

I tried to refresh the index (/my_index/_refresh), to launch the refresh after update with "?refresh" (even if it's by default), to set "refresh_interval" to 1 second.

Any idea about this behavior, did I forget something?

Update with the query (extract from Java code) :

   {
  "from": 0,
  "size": 50,
  "query": {
    "bool": {
      "should": [
        {
          "query_string": {
            "query": "*par*",
            "fields": [
              "contact.address.*^1.2",
              "id^1.2",
              "information.*^1.2"
            ],
            "type": "best_fields",
            "default_operator": "or",
            "max_determinized_states": 10000,
            "enable_position_increments": true,
            "fuzziness": "AUTO",
            "fuzzy_prefix_length": 0,
            "fuzzy_max_expansions": 50,
            "phrase_slop": 0,
            "analyze_wildcard": true,
            "escape": false,
            "auto_generate_synonyms_phrase_query": true,
            "fuzzy_transpositions": true,
            "boost": 1
          }
        }
      ],
      "adjust_pure_negative": true,
      "boost": 1
    }
  },
  "_source": {
    "includes": [
      "id",
      "information.*",
      "geoPosition.*"
    ],
    "excludes": []
  }
}

Update with an extract of mapping

{
    "station_index_test": {
        "mappings": {
            "station_type": {
                "properties": {
                    "contact": {
                        "properties": {
                            "address": {
                                "properties": {
                                    "city": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "country": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "countryCode": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "postCode": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "streetLines": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    }
                                }
                            },
                            "faxNumber": {
                                "type": "text",
                                "fields": {
                                    "keyword": {
                                        "type": "keyword",
                                        "ignore_above": 256
                                    }
                                }
                            },
                            "phoneNumber": {
                                "type": "text",
                                "fields": {
                                    "keyword": {
                                        "type": "keyword",
                                        "ignore_above": 256
                                    }
                                }
                            }
                        }
                    },
                    "id": {
                        "type": "text",
                        "fields": {
                            "keyword": {
                                "type": "keyword",
                                "ignore_above": 256
                            }
                        }
                    },
                    "information": {
                        "properties": {
                            "localizedNames": {
                                "properties": {
                                    "name-ar_AE": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-ar_EG": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-bg_BG": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-bs_BA": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-ca_ES": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-cs_CZ": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-da_DK": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-de_AT": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-de_CH": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-de_DE": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-el_GR": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-en_AT": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-en_AU": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-en_BE": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-en_CH": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-en_GB": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-en_IE": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-en_NZ": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-en_US": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-es_ES": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-et_EE": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-fa_IR": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-fi_FI": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-fr_BE": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-fr_CH": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-fr_FR": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-he_IL": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-hr_HR": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-hu_HU": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-hy_AM": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-it_CH": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-it_IT": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-ja_JP": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-ko_KR": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-lt_LT": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-lv_LV": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-nl_BE": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-nl_NL": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-no_NO": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-pl_PL": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-pt_PT": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-ro_RO": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-ru_RU": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-sk_SK": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-sl_SI": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-sq_AL": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-sv_FI": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-sv_SE": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-th_TH": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-tr_TR": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-uk_UA": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    },
                                    "name-zh_CN": {
                                        "type": "text",
                                        "fields": {
                                            "keyword": {
                                                "type": "keyword",
                                                "ignore_above": 256
                                            }
                                        }
                                    }
                                }
                            },
                            "name": {
                                "type": "text",
                                "fields": {
                                    "keyword": {
                                        "type": "keyword",
                                        "ignore_above": 256
                                    }
                                }
                            },
                            "timezone": {
                                "type": "text",
                                "fields": {
                                    "keyword": {
                                        "type": "keyword",
                                        "ignore_above": 256
                                    }
                                }
                            },
                            "type": {
                                "type": "text",
                                "fields": {
                                    "keyword": {
                                        "type": "keyword",
                                        "ignore_above": 256
                                    }
                                }
                            }
                        }
                    },
                    "services": {
                        "properties": {
                            "code": {
                                "type": "text",
                                "fields": {
                                    "keyword": {
                                        "type": "keyword",
                                        "ignore_above": 256
                                    }
                                }
                            }
                        }
                    },
                    "views": {
                        "type": "long"
                    }
                }
            }
        }
    }
}

Update : explanation before and after are same :

{
"value": 1.2,
"description": "max of:",
"details": [
    {
        "value": 1.2,
        "description": "information.localizedNames.name-pt_PT.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-de_AT:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-cs_CZ.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-fr_BE.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-cs_CZ:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_CH:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sl_SI.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ro_RO:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ko_KR:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ar_EG.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-uk_UA.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ko_KR.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ru_RU.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-fr_CH.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-fa_IR.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-es_ES:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sk_SK:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-bg_BG.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sv_FI.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_BE:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sv_SE:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sq_AL:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_IE.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-da_DK:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-fi_FI.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.name:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_AU:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_AT:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-fr_FR.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-el_GR:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-pt_PT:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-de_CH.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sk_SK.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-pl_PL:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-he_IL:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_NZ.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-tr_TR:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ja_JP.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-de_CH:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-uk_UA:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_US:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-de_DE:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-no_NO.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-hy_AM.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-fr_BE:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ar_AE.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-et_EE.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ar_AE:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-da_DK.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.name.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-pl_PL.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-lt_LT.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-fi_FI:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-lv_LV:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sv_SE.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sl_SI:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-fr_CH:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_AT.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "contact.address.city:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-bs_BA:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-es_ES.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-lv_LV.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-tr_TR.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-hu_HU:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_GB:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-hr_HR.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-de_AT.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-th_TH:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ro_RO.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_US.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sv_FI:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-zh_CN.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_NZ:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-th_TH.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ca_ES:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-el_GR.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ja_JP:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-hr_HR:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-lt_LT:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-sq_AL.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-no_NO:*paris*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-en_AU.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-bs_BA.keyword:*PARIS*^1.2",
        "details": []
    },
    {
        "value": 1.2,
        "description": "information.localizedNames.name-ru_RU:*paris*^1.2",
        "details": []
    }
]

}

1
Can you show your query? - Val
yes, post edited - Mohammed
Can you also show your mapping please? - Val
yes, an overview of the mapping has been posted - Mohammed
well, I'm interested to see where your phone field appears, but it's not in there :-) - Val

1 Answers

0
votes

Scoring is somewhat intricate: https://www.elastic.co/guide/en/elasticsearch/reference/current/consistent-scoring.html

As I understand all the documents get the same score in your case. So when ordering by score the exact order is kind of Undefined Behaviour. When you update a document it gets reindexed (removed and inserted again) so it's possible to go anywhere in the list. If you need a consistent and predictable sorting then maybe add ordering by ID for instance to ordering by _score (default).