Sort results by exact match, then by attribute

Hello,

I would like to know if it’s possible to sort results (hits) per exact match and attributes (title and description). For example, in my case, if I type “cg”, I would like to have something like that :

{
  title: 'CG – conditions générales'
  description: 'No match in the description'
},
{
  title: 'No match in title'
  description: 'CG – conditions générales'
},
{
  title: 'CGA'
  description: 'CGP'
},
{
  title: 'No match in description'
  description: 'CGP'
},

But for the moment I have someting like that :

{
  title: 'CGA'
  description: 'CGP'
},
{
  title: 'CG – conditions générales'
  description: 'No match in the description'
},
{
  title: 'No match in title'
  description: 'CG – conditions générales'
},
{
  title: 'No match in description'
  description: 'CGP'
},

Thanks for help.

Hi @BeAPI your search relevance will come from the way you have your searchable attributes set up as well as the ranking strategy you are using. You can learn more about the ranking strategy here. Your Algolia dashboard can help you troubleshoot your ranking strategy by hovering over the medal icon on the bottom of each record. It will show you how that record was ranked.

Thank you @cindy.cullen ,

But I don’t understrand how “Exact words count” works. For example, if I type “cg” why my “Exact words count” value is still on 0 for this hit?

When you have a single word, for it to be an exact match the whole attribute needs to match. If you would like help with your relevancy please feel free to open a ticket with us as well at support@algolia.com.