Phrase Suggester Returned suggestions even if searched keyword is in the index

Hi

Im using ES 2.3. I have a phrase suggester that's returning suggestions with a higher score than the searched text even though the searched text is in the index (suggest dictionary). Is this expected ? (although that's not what I need)

I have 1000's of documents with "Blue" in the name and couple of documents with "Blur". When I run the phrase suggester, I get "Blue" with a higher score than "Blur". I tried with "confidence:0.0" to actually see the exact score of blur since it was not returned with the default confidence.

This is my analyzer -

"simple_trigram": {
                  "type": "custom",
                  "tokenizer": "standard",
                  "filter": ["ascii_folding_preserve", "lowercase", "trim", "shingle_for_spellcheck"],
                  "char_filter" : ["punctuation_char_mapping"]
             }
And this is shingle filter - 
"shingle_for_spellcheck": {
            "type": "shingle",
            "min_shingle_size": 2,
            "max_shingle_size": 3,
            "output_unigrams": true
          }
And this is how I query - 
    "ngram": {
      "text": "blur",
      "phrase": {
        "field": "spell_check_field_en-us",
        "confidence":0.0,
        "direct_generator": [
          {
            "field": "spell_check_field_en-us",
            "max_edits":1
          }
        ]
      }
    }

Response : There are two hits for "blur" match query, however, I see these suggestions which I don't expect.

"ngram": [
      {
        "text": "blur",
        "offset": 0,
        "length": 4,
        "options": [
          {
            "text": "blue",
            "score": 0.033866636
          },
          {
            "text": "blu",
            "score": 0.010273874
          },
          {
            "text": "blut",
            "score": 0.0074840933
          },
          {
            "text": "blur",
            "score": 0.006959285
          },
          {
            "text": "blum",
            "score": 0.0062757228
          }
        ]
      }
    ]

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