# Shuffle results by a property

**URL:** <https://discuss.elastic.co/t/shuffle-results-by-a-property/23390>\
**Category:** Elasticsearch\
**Created:** [April 24, 2015, 11:42am UTC](https://discuss.elastic.co/t/shuffle-results-by-a-property/23390 "2015-04-24T11:42:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cassianotartari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cassianotartari/32/749_2.png) [@cassianotartari](https://discuss.elastic.co/u/cassianotartari)\
**Post date:** [April 24, 2015, 11:42am UTC](https://discuss.elastic.co/t/shuffle-results-by-a-property/23390/1 "2015-04-24T11:42:09Z")

</div>

​Hello!

```
I have a marketplace and I would like to sort the search results mixing

```

products advertisers.

```
Can someone help me?

I'm making a filtered query like this:

```

​ "query": {  
"filtered": {  
"query": {  
"bool": {  
"must": [  
{  
"match": {  
...  
}  
}  
},  
{  
"match": {  
...  
}  
}  
],  
"should": [  
{  
"match": {  
...  
}  
},  
{  
"multi\_match": {  
"query": "",  
"type": "best\_fields",  
"fields": [  
....  
],  
"tie\_breaker": 0.3,  
"fuzziness": 1  
}  
}  
]  
}  
},  
"filter": {  
"bool": {  
"must": [  
{  
"nested": {  
...  
}  
}  
},  
{  
"not": {  
"filter": {  
"term": {  
...  
}  
}  
}  
},  
{  
"not": {  
"filter": {  
"term": {  
...  
}  
}  
}  
}  
]  
}  
}  
}  
}​

​ ​The advertisers are mapped into product as objects.

Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAUnKK5XuWz9tAyUXV6WSPzgrzGRM8BGEYvNLCCZe3500Px%2BEg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAUnKK5XuWz9tAyUXV6WSPzgrzGRM8BGEYvNLCCZe3500Px%2BEg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:17am UTC](https://discuss.elastic.co/t/shuffle-results-by-a-property/23390/2 "2017-07-06T00:17:54Z")

</div>


