Edge-ngram and irrelevant scoring

Hello ,
I'm applying edge-ngram as index toxenizer . My problem is that when a term matches , it matches so many times on the same field . As a consequence , the score become too high and irrelevant.
Here is an example : when i search for the word "Hystorique" i match the value "Consultation_Hystorique_Clients_Recherches" which is correct . but here is the highlights :

"highlight": {
                        "data.content": [
                            "Consultation_<em>Hys</em><em>t</em><em>o</em><em>r</em><em>i</em><em>q</em><em>u</em><em>e</em>_Clients_Recherches"
                        ]
>                     }.

here is my analyzer:

"analysis": {
          "analyzer": {
            "autocomplete": {
              "tokenizer": "autocomplete",
              "filter": ["lowercase"]
            }
          },
          "tokenizer": {
            "autocomplete": {
              "type": "edge_ngram",
              "min_gram": 3,
              "max_gram": 50,
              "token_chars": [
                "letter","digit","letter_number","uppercase_letter","line_separator"
              ],"custom_token_chars": ["_","-"]
            }
          }
        }
      },

thanks in advance.

I think you should define in the mapping a simple search_analyzer for your field.
This might help.

I shared an example at the very end of this gist:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.