# Returning results with a relevancy score of 0 when sort field is passed

**URL:** <https://discuss.elastic.co/t/returning-results-with-a-relevancy-score-of-0-when-sort-field-is-passed/187314>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [June 25, 2019, 11:24am UTC](https://discuss.elastic.co/t/returning-results-with-a-relevancy-score-of-0-when-sort-field-is-passed/187314 "2019-06-25T11:24:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harry\_Knowles](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harry_knowles/32/48727_2.png) [@Harry\_Knowles](https://discuss.elastic.co/u/Harry_Knowles)\
**Post date:** [June 25, 2019, 11:24am UTC](https://discuss.elastic.co/t/returning-results-with-a-relevancy-score-of-0-when-sort-field-is-passed/187314/1 "2019-06-25T11:24:19Z")

</div>

When passing a sort field, the client seems to be returning results with a relevancy score of 0. Should these not be excluded completely as they are not relevant to the search term?

We have a sort by price field. When selecting either low or high, it seems to be returning our most expensive, or inexpensive indexed product and doesn't check if the relevancy score is above 0.

Initially posted this as an issue on the javascript API client GitHub page, however, they have mentioned this is an API issue and should be posted here. [Returning results with a relevancy score of 0 when sort field is passed · Issue #61 · swiftype/swiftype-app-search-javascript · GitHub](https://github.com/swiftype/swiftype-app-search-javascript/issues/61)

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![orhantoy](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@orhantoy](https://discuss.elastic.co/u/orhantoy)\
**Post date:** [June 26, 2019, 7:46am UTC](https://discuss.elastic.co/t/returning-results-with-a-relevancy-score-of-0-when-sort-field-is-passed/187314/2 "2019-06-26T07:46:41Z")

</div>

Hi @Harry_Knowles. Are you seeing `_meta.score` being `null` or `0`? If you can provide a snippet (of how you invoke the API with the JS client) that would be very helpful.

---

<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 24, 2019, 7:46am UTC](https://discuss.elastic.co/t/returning-results-with-a-relevancy-score-of-0-when-sort-field-is-passed/187314/3 "2019-07-24T07:46:42Z")

</div>

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