# Results ranking: how to?

**URL:** <https://discuss.elastic.co/t/results-ranking-how-to/9583>\
**Category:** Elasticsearch\
**Created:** [November 6, 2012, 4:12pm UTC](https://discuss.elastic.co/t/results-ranking-how-to/9583 "2012-11-06T16:12:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![11111](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/11111/32/2406_2.png) [@11111](https://discuss.elastic.co/u/11111)\
**Post date:** [November 6, 2012, 4:12pm UTC](https://discuss.elastic.co/t/results-ranking-how-to/9583/1 "2012-11-06T16:12:37Z")

</div>

How to implement something different than term frequency ranking?

When user types "_italian restaurant with wi-fi at 5th avenue_", I want to  
find document with:  
_address_ (string) - 5th avenue  
_kitchens_ (array of strings) - italian  
_categories_ (array of strings) - restaurant  
_fields.name_ (string) - wi-fi (exists only when wi-fi = true)  
"with" and "at" are already added to stopwords.

In Sphinx it was done by using proximity\_bm25 ranking mode. How can I  
achieve the same result with ES?

--

---

<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:** [November 7, 2012, 2:55am UTC](https://discuss.elastic.co/t/results-ranking-how-to/9583/2 "2012-11-07T02:55:47Z")

</div>

Heya, you already posted a question about it on the google group, if you  
are missing something, continue that thread and don't post the same  
question again, but with even _less_ information. Its going to be harder  
for the community to properly help you as now there are two threads to  
possibly answer.

On Tuesday, November 6, 2012 5:12:37 PM UTC+1, Кирилл Шнуров wrote:

> How to implement something different than term frequency ranking?
> 
> When user types "_italian restaurant with wi-fi at 5th avenue_", I want  
> to find document with:  
> _address_ (string) - 5th avenue  
> _kitchens_ (array of strings) - italian  
> _categories_ (array of strings) - restaurant  
> _fields.name_ (string) - wi-fi (exists only when wi-fi = true)  
> "with" and "at" are already added to stopwords.
> 
> In Sphinx it was done by using proximity\_bm25 ranking mode. How can I  
> achieve the same result with ES?

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [November 7, 2012, 11:37am UTC](https://discuss.elastic.co/t/results-ranking-how-to/9583/3 "2012-11-07T11:37:00Z")

</div>

Кирилл,

I think extremely high scores that you are getting might be caused by index  
time boosting and multi-valued fields. Try switching to query time  
boosting. Take a look at this  
example: [relevance.sh · GitHub](https://gist.github.com/b62f45dcf28a5c030e67) and see if it works  
for you.

Igor

On Tuesday, November 6, 2012 9:55:47 PM UTC-5, kimchy wrote:

> Heya, you already posted a question about it on the google group, if you  
> are missing something, continue that thread and don't post the same  
> question again, but with even _less_ information. Its going to be harder  
> for the community to properly help you as now there are two threads to  
> possibly answer.
> 
> On Tuesday, November 6, 2012 5:12:37 PM UTC+1, Кирилл Шнуров wrote:
> 
> > How to implement something different than term frequency ranking?
> > 
> > When user types "_italian restaurant with wi-fi at 5th avenue_", I want  
> > to find document with:  
> > _address_ (string) - 5th avenue  
> > _kitchens_ (array of strings) - italian  
> > _categories_ (array of strings) - restaurant  
> > _fields.name_ (string) - wi-fi (exists only when wi-fi = true)  
> > "with" and "at" are already added to stopwords.
> > 
> > In Sphinx it was done by using proximity\_bm25 ranking mode. How can I  
> > achieve the same result with ES?

--

---

<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:05am UTC](https://discuss.elastic.co/t/results-ranking-how-to/9583/4 "2017-07-06T03:05:46Z")

</div>


