# Match all words in any order but duplicates consider as individual

**URL:** <https://discuss.elastic.co/t/match-all-words-in-any-order-but-duplicates-consider-as-individual/196090>\
**Category:** Elasticsearch\
**Created:** [August 21, 2019, 11:08am UTC](https://discuss.elastic.co/t/match-all-words-in-any-order-but-duplicates-consider-as-individual/196090 "2019-08-21T11:08:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjireddy543](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@anjireddy543](https://discuss.elastic.co/u/anjireddy543)\
**Post date:** [August 21, 2019, 11:08am UTC](https://discuss.elastic.co/t/match-all-words-in-any-order-but-duplicates-consider-as-individual/196090/1 "2019-08-21T11:08:26Z")

</div>

Hi,

We have a text field which matches words in any order but when duplicate comes still both words need to exist.  
Below is my query and results

```
"query": {
        "match": {
            "field": {
                "operator": "and",
                "query": "2019 1 Scc 1"
            }
        }
    }

```

wrong results : 2019 6 SCC 1, 2019 5 SCC 1,SCC 1 2009 6  
correct result : 1 2019 Scc 1

Is their any solution for this.

---

<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:** [September 18, 2019, 11:08am UTC](https://discuss.elastic.co/t/match-all-words-in-any-order-but-duplicates-consider-as-individual/196090/2 "2019-09-18T11:08:33Z")

</div>

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