Company search results: order by relevance

Is there any method to search for companies where the result set will not be alphabetic, but rather ranked by some relevance level in respect to the search term? Are there any plans to consider this as an addition to the API?

The current company search results should be sorted by relevance. Do you have an example where this isn’t working as you expected?

well, if you search for “sport shop” the top results are:

  • GO <strong>SHOP</strong> <strong>SPORT</strong> LIMITED
  • L&S <strong>SPORT</strong> <strong>SHOP</strong> LTD
  • 1 STOP <strong>SPORT</strong> <strong>SHOP</strong> LIMITED
  • HAVEN TRIALS <strong>SPORT</strong> <strong>SHOP</strong> LIMITED
  • THE OUTDOOR <strong>SPORT</strong> <strong>SHOP</strong> UK LIMITED

By relevance, I’d expect the 1st result to come after 2-5. But, relevance is a tricky thing… In any event, in all API calls I’ve made, the result set seems to fallback to alphanumeric ordering after the first 3-8 results.

I guess it is not a matter of what is right or wrong, but just of understanding the logic so we can work with it.

When a search is run each search result is given a score and the search results are sorted by this score. For any results with the same score the results are sorted alphabetically. The order of the words in the search results doesn’t affect the score. It looks like after the first few results the score is the same - leading to the alphabetic sorting. I agree that this isn’t very predictable and we will look into what we can do to improve this.

I’ve also noticed that it doesn’t seem to match “shop” after the first page of results. So we’ll look into why that is as well.

Does that mean that, in each item, _score is a confidence level?

If so, that is really nice, and it would be super useful if you could document this somehow. At very least, how does the scaling work?

I did now a query for “shop”, and the first match has this score:

_score': 1.0262854

How should I understand this value of 1.0262854?

We use ElasticSearch to power the search and the _score is a relevance score. This score will be generated based on the search algorithm used and I agree it would be useful for us to document this.

Great! That is a good start. Thanks.