Make collate score count for suggest candidates rank

elasticsearch 2.4

We use phrase suggester against 10 millions doc, extract of suggest part from our search template :

"suggest": {
         "spellchecker": {
            "text": "{{my_query}}",
            "phrase": {
               "field": "{{field_name}}",
               "confidence": 1,
               "size": 5,
               "max_errors": 3,
               "highlight": {
                  "pre_tag": "<b>",
                  "post_tag": "</b>"
               },
               "direct_generator": [
                  {
                     "field": "{{field_name}}",
                     "suggest_mode": "always",
                     "prefix_length": 0,
                     "min_word_length": 1,
					 "min_doc_freq" : 200,
                     "string_distance": "damerau_levenshtein"
                  }
               ],
               "collate": {
                  "query": {
                     "inline": {
                        "match_phrase": {
                           "{{field_name}}": "{{=<% %>=}}{{suggestion}}<%={{ }}=%>"
                        }
                     }
                  },
                  "prune": false
               }
            }
         }
    },    

but it seems for 30% of cases, it select candidates that dont match better the collate query (which is for us, a simple match_phrase query).

So now we run the match queries after and select the highest score , for all candidates, and found this is very good .

My question is, is it possible that collate query score count for candidate ranking ?

(Sorry, I didnt manage to reproduce it with a simple example).

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