Ranking of queries with prefixLast

Dear Algolia

I use ‘queryType’: ‘prefixLast’. I have the following problem. I index laws so I would like to be able to find lawxxx § 3’ when I submit the query ‘lawxxx § 3’. Problem is that in lawxxx I also have § 33, § 309 etc. Currently in many cases the highest ranked result is not lawxxx § 3 but rather e.g. lawxxx § 309. The latter result is retrieved becuase I use prefixLast. Is there a way to rank results lower which were found using prefixLast?

Best

Hi there,

You should have a look at allowTyposOnNumericTokens and try to set it to false. That should solve your issue.

Hi Maxime

Thank you. I overlooked that option. I will try and see if that weill solve my problems (i guess so).

I still do not understand why the result which was found using prefixLast is ranked higher than the exact match? Ranking info are:

“_rankingInfo”: {
“nbTypos”: 0,
“firstMatchedWord”: 0,
“proximityDistance”: 2,
“userScore”: 239312,
“geoDistance”: 0,
“geoPrecision”: 1,
“nbExactWords”: 3,
“words”: 3,
“filters”: 0
}

   },
  "_rankingInfo": {
    "nbTypos": 0,
    "firstMatchedWord": 0,
    "proximityDistance": 2,
    "userScore": 238949,
    "geoDistance": 0,
    "geoPrecision": 1,
    "nbExactWords": 3,
    "words": 3,
    "filters": 0
  }

Best Regards

Hi Maxime

I just tested your suggestion. It does not solve my problem. Are you sure that prefixing is considered a typo?

Best

Dear Algolia

Do you have any idea on how to solve this problem?

Best Jens

Dear Algolia

Could you please help us with this issue? It is very troublesome fro us that you have this bug