# Better search result with relevant data with prioritization

**URL:** <https://discuss.elastic.co/t/better-search-result-with-relevant-data-with-prioritization/273849>\
**Category:** Elasticsearch\
**Created:** [May 24, 2021, 4:10pm UTC](https://discuss.elastic.co/t/better-search-result-with-relevant-data-with-prioritization/273849 "2021-05-24T16:10:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gopal\_Chauhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gopal_chauhan/32/51033_2.png) [@Gopal\_Chauhan](https://discuss.elastic.co/u/Gopal_Chauhan)\
**Post date:** [May 24, 2021, 4:10pm UTC](https://discuss.elastic.co/t/better-search-result-with-relevant-data-with-prioritization/273849/1 "2021-05-24T16:10:32Z")

</div>

Hi ,

I am trying to improve relevant search. I have list of fields (around 21) with priority order(total fields in document arnd 120). Those fields need to get more priority as compare to others during search.

I am using ^ operator for the same . higher priority field is getting more no as compare to lower priority after ^ operator. for example below is priority

1- last name (1st priority)  
2- first name (second priority)  
3- address (third)

Issue - I searched with exact match on first name and last name and I got 7 result. When using ^ operator query with same input, top 5 results come same, but last two is showing some other data because last name is appearing in address also(thats what I am guessing).

How can I make sure the entire content get search first against all priority fields and then rest of fields and get better relevant data?

Thanks,  
Gopal

---

<div class="post-metadata">

**Author:** ![Gopal\_Chauhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gopal_chauhan/32/51033_2.png) [@Gopal\_Chauhan](https://discuss.elastic.co/u/Gopal_Chauhan)\
**Post date:** [May 24, 2021, 4:32pm UTC](https://discuss.elastic.co/t/better-search-result-with-relevant-data-with-prioritization/273849/2 "2021-05-24T16:32:21Z")

</div>

i am using below query

```auto
   "query": {
    "dis_max": {
      "queries": [
        {
          "multi_match": {
            "query": "\"Tom Hanks\"",
            "fields": [
              "Address^22",             
              "FirstName^26",             
              "LastName^34", 
              "*"
            ],
            "type": "cross_fields"
          }
        }
        
      ],
      "tie_breaker": 0.7
    }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 21, 2021, 4:32pm UTC](https://discuss.elastic.co/t/better-search-result-with-relevant-data-with-prioritization/273849/3 "2021-06-21T16:32:42Z")

</div>

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