# Implement search priority without losing relvancy

**URL:** <https://discuss.elastic.co/t/implement-search-priority-without-losing-relvancy/61567>\
**Category:** Elasticsearch\
**Created:** [September 27, 2016, 7:53am UTC](https://discuss.elastic.co/t/implement-search-priority-without-losing-relvancy/61567 "2016-09-27T07:53:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![habtim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/habtim/32/11895_2.png) [@habtim](https://discuss.elastic.co/u/habtim)\
**Post date:** [September 27, 2016, 7:53am UTC](https://discuss.elastic.co/t/implement-search-priority-without-losing-relvancy/61567/1 "2016-09-27T07:53:24Z")

</div>

Hello evryone,

Over a full text search I also need to implement that articles configured in a back-end with the checkbox has\_search\_priority to true, will come before any other article without has\_search\_priority on the same text search.

Anyone has an idea how to do this?

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [September 27, 2016, 8:27am UTC](https://discuss.elastic.co/t/implement-search-priority-without-losing-relvancy/61567/2 "2016-09-27T08:27:58Z")

</div>

It seems to me that you could sort by `has_search_priority` then `_score`.

```auto
{
    "sort" : [
        { "has_search_priority" : "desc" },
        "_score"
    ]
}

```

---

<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:17pm UTC](https://discuss.elastic.co/t/implement-search-priority-without-losing-relvancy/61567/3 "2017-07-05T22:17:00Z")

</div>


