# What's the correct syntaxe for queries?

**URL:** <https://discuss.elastic.co/t/whats-the-correct-syntaxe-for-queries/48441>\
**Category:** Elasticsearch\
**Created:** [April 26, 2016, 2:49pm UTC](https://discuss.elastic.co/t/whats-the-correct-syntaxe-for-queries/48441 "2016-04-26T14:49:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![loez1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loez1/32/9274_2.png) [@loez1](https://discuss.elastic.co/u/loez1)\
**Post date:** [April 26, 2016, 2:49pm UTC](https://discuss.elastic.co/t/whats-the-correct-syntaxe-for-queries/48441/1 "2016-04-26T14:49:40Z")

</div>

Hi,

I want to use function\_score and bool in the same query but I can't find the correct syntaxe !!!

In that way; it dosent work ! knowing that queryTxt is what I wanna search

```
        query:
          bool: 
            should: [
              match_phrase: 
                "NAME": queryTxt]
          function_score:
            query:
              query_string:
                fields: ["NAME^5", "TYPE^1", "DEFINITION^3"]
                query: queryTxt

```

HELP !

---

<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:** [July 5, 2017, 10:56pm UTC](https://discuss.elastic.co/t/whats-the-correct-syntaxe-for-queries/48441/2 "2017-07-05T22:56:15Z")

</div>


