# Field boost vs query text boost

**URL:** <https://discuss.elastic.co/t/field-boost-vs-query-text-boost/232305>\
**Category:** Elasticsearch\
**Created:** [May 12, 2020, 7:25pm UTC](https://discuss.elastic.co/t/field-boost-vs-query-text-boost/232305 "2020-05-12T19:25:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lalit\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lalit_kumar/32/48738_2.png) [@Lalit\_Kumar](https://discuss.elastic.co/u/Lalit_Kumar)\
**Post date:** [May 12, 2020, 7:25pm UTC](https://discuss.elastic.co/t/field-boost-vs-query-text-boost/232305/1 "2020-05-12T19:25:51Z")

</div>

In elaticsearch7.x either of these queries are not working please correct me where i'm wrong.

i want a search which is boosted with field and specific word in a query.

query = ("winter foxˆ2" OR "summer ice")

query = ("winter fox"ˆ2 OR "summer ice")

```auto
   "query" : {
                     "bool" : {
                                    "must" :[
                                            {
                                        "query_string" : {
                                                "query" : query,
                                                "fields" : ["field1^4", "field2^3",'field4^2','field3^2'],
                                                "quote_field_suffix": ".keyword",
                                                "default_operator": "OR",
                                                "type":"most_fields",
                                                "tie_breaker":1,
                                                "auto_generate_synonyms_phrase_query" : True,
                                                "phrase_slop" : 2
                                                 } 
                                             }

                                        ],

                                    },

                                }

```

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [May 14, 2020, 8:20am UTC](https://discuss.elastic.co/t/field-boost-vs-query-text-boost/232305/2 "2020-05-14T08:20:43Z")

</div>

> [@Lalit\_Kumar](#):
>
> In elaticsearch7.x either of these queries are not working

To answer this it would help to understand what's not working.  
Do you get an error when sending the query? If so, please include the exact JSON query and everything you can gather arount the error.  
Or are you not finding expected documents, or the ranking is not as expected? Then please inlcude a small example of documents you have in your index and state which ones you expect to find or not find, and whats wrong with the answer you're getting. This will help others to answer to your problem.

---

<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 11, 2020, 8:20am UTC](https://discuss.elastic.co/t/field-boost-vs-query-text-boost/232305/3 "2020-06-11T08:20:45Z")

</div>

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