exactOnSingleWordQuery = attribute not working as expected

I ran into an issue where users are searching for a specific term, Migraine.

We have a number of articles about that topic all of which that start with Migraine, but there’s only one where the title is the exact word “Migraine” yet its always showing at the bottom of the search results. I feel like you’d want it to go in exactly the opposite order here where the exact match on the full title pushed the result up to the top?

  1. Migraine with brainstem aura
  2. Migraine in childhood
  3. Migraine aura without headache
  4. Migraine: psychiatric comorbidities
  5. Migraine and epilepsy
  6. Migraine

I tried setting exactOnSingleWordQuery = attribute which I thought was doing what we wanted but its still counting it as an exact match on all the other 5 articles?

Am I missing something about how this should work or is something not working the way it should?

Hi @keith1, welcome to the community!

Hmm, that’s strange indeed. With exactOnSingleWordQuery set to “attribute”, only records where the entire attribute = “Migraine” should score exact as 1.

Would you mind pinging us over at support@algolia.com with the appID and index name you see this occurring on? Please also provide us 7 days or more of read access to your app on the Algolia support access page – this will allow us to take a closer look at your records and configurations.

Thanks in advance!