I want the full match text comes first than their prefixes than their substrings results

Suppose If I am searching for Rohan Roy, I want Rohan Roy matching results comes first then rohan , rohan chohan etc....

The query I have used :

  "size": 1000,
  "query": {
    "bool": {
      "must": [
          "terms": {
            "EntityType": ["entity1","entity2"]
          "multi_match": {
            "query": "Rohan Roy",
            "type": "most_fields",
            "fields": [
             "EntityType", "Title",
            "fuzziness": "AUTO"

I am searching on 2 indices.
Index1 document fields: EntityType, Title, Description
Index2 document fields: EntityType, Name, Tags

where EntityType is a keyword field and all are search-as-you-type fields.

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