Phrase Request for Phrase

I am having a problem where elasticsearch is returning different results in my environment (stage and production).

The elasticsearch version I am using is the same for both environments.

version: { created: 1000199}

      

Both environments have the same display and index settings.

I have an element indexed with a "test" title field. I am trying to execute a match_phrase_prefix request. However, in my staging environment, when I just search for "t", the result is returned as expected. During production, I have to expand my search term to "tes" (3 letters) to get the document.

The request I'm issuing is the following:

{
  "query": {
    "match_phrase_prefix": {
      "title": "test"
    }
  },
  "post_filter": {
    "term": {
      "uniqueId": "my_unique_id"
    }
  }
}

      

The only difference I can see between the two environments is the number of document indexes.

In my staging environment, I have approx. 150k, which equates to approximately 297M.

I have over 120 million indexed documents in production, which equates to 120 GB.

Is this a scale issue, or is there some elasticsearch tweak I am missing. As I said, the mappings and settings are identical in different environments, so I'm a bit confused here.

+3


source to share


1 answer


I am very late but see a different answer. The problem lies in the parameter max_expansions

, which is 10 by default.



Your staging environment has fewer words that start with "te" than your production environment and it can get a test in 10 extensions (alphabetical)

+2


source







All Articles