# Minimum\_should\_match ignore specific should property

**URL:** https://discuss.elastic.co/t/minimum-should-match-ignore-specific-should-property/319982
**Category:** Elasticsearch
**Created:** [November 28, 2022, 9:33pm UTC](https://discuss.elastic.co/t/minimum-should-match-ignore-specific-should-property/319982 "2022-11-28T21:33:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hgr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hgr/32/97628_2.png) [@hgr](https://discuss.elastic.co/u/hgr)
#### Post date: [November 28, 2022, 9:33pm UTC](https://discuss.elastic.co/t/minimum-should-match-ignore-specific-should-property/319982/1 "2022-11-28T21:33:50Z")

</div>

Hi there,  
I have a query with 3 should filters, with different boost values, like this

```auto
"should": [
            {
               "constant_score": {
                  "filter": {
                     "term": {
                        "url.keyword": "myurl.com"
                     }
                  },
                  "_name": "url",
                  "boost": 20
               }
            },
            {
               "constant_score": {
                  "filter": {
                     "term": {
                        "child_urls.keyword": "myurl.com"
                     }
                  },
                  "_name": "child_url",
                  "boost": 18
               }
            },
            {
               "constant_score": {
                  "filter": {
                     "term": {
                        "profile": "main"
                     }
                  },
                  "_name": "is_main",
                  "boost": 80
               }
            },
            minimum_should_match":1,
`

```

I'd like to force the result to match at least on "url" or "child\_ur" and if it also matches profile, I want to boos this document.  
The problem is that with `minimum_should_match":1,` I end up always matching since the `profile:main` will always match.  
Is there any way to scope the `minimum_should_match` to a subset of `should`? I can't specify the minimum value to 2, because I want to match even if the profile is not main.

---

<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: [December 26, 2022, 9:34pm UTC](https://discuss.elastic.co/t/minimum-should-match-ignore-specific-should-property/319982/2 "2022-12-26T21:34:38Z")

</div>

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