# Re: How to emulate Sphinx "quorum matching operator"?

**URL:** <https://discuss.elastic.co/t/re-how-to-emulate-sphinx-quorum-matching-operator/7293>\
**Category:** Elasticsearch\
**Created:** [April 11, 2012, 12:33pm UTC](https://discuss.elastic.co/t/re-how-to-emulate-sphinx-quorum-matching-operator/7293 "2012-04-11T12:33:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 11, 2012, 12:33pm UTC](https://discuss.elastic.co/t/re-how-to-emulate-sphinx-quorum-matching-operator/7293/1 "2012-04-11T12:33:42Z")

</div>

Thanks for sharing your solution!

On Wed, Apr 11, 2012 at 1:15 PM, Giorgio Salluzzo \<  
[giorgio.salluzzo@gmail.com](mailto:giorgio.salluzzo@gmail.com)\> wrote:

> Here is a query that emulates the same behaviour:
> 
> {  
> "fields": [  
> "track\_id"  
> ],  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "query\_string": {  
> "fields": [  
> "track\_name"  
> ],  
> "query": "dalla parte del toro blu",  
> "minimum\_should\_match": "30%",  
> "use\_dis\_max": false,  
> "default\_operator": "OR"  
> }  
> },  
> {  
> "query\_string": {  
> "fields": [  
> "artist\_name",  
> "artist\_aliases"  
> ],  
> "query": "caparezza gianni",  
> "minimum\_should\_match": "30%",  
> "use\_dis\_max": false,  
> "default\_operator": "OR"  
> }  
> }  
> ]  
> }  
> },  
> "size": 10,  
> "from": 0,  
> "sort":   
> }
> 
> On 10 Apr, 17:12, Giorgio Salluzzo [giorgio.sallu...@gmail.com](mailto:giorgio.sallu...@gmail.com) wrote:
> 
> > Hi there,  
> > I'm looking for the best way to emulate a Sphinx operator on  
> > Elasticsearch. Here is the operator explanation on the Sphinx  
> > documentation:
> > 
> > """  
> > Quorum matching operator introduces a kind of fuzzy matching. It will  
> > only match those documents that pass a given threshold of given words.  
> > The example above ("the world is a wonderful place"/3) will match all  
> > documents that have at least 3 of the 6 specified words.  
> > """"
> > 
> > How can I obtain the same result on Elasticsearch?
> > 
> > Thanks in advance.
> > 
> > Regards,  
> > Giorgio

---

<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 6, 2017, 3:32am UTC](https://discuss.elastic.co/t/re-how-to-emulate-sphinx-quorum-matching-operator/7293/2 "2017-07-06T03:32:55Z")

</div>

Closed on July 6, 2017, 3:32am UTC


