MATCH without filtering results

Hi,

I am getting familiar with the vector search in Manticore and I was wondering if there is any way to use MATCH without filtering the results just with the purpose of using the WEIGHT for sorting.

I am trying to implement a ranking formula based on both KNN_DIST and MATCH to resort the results using a subquery.

Right now I am injecting a placeholder string in every row and reusing it the search is performed just to get some results at anytime.

The way I approached this in case anyone needs it was this:

  1. Added a column dummy_match to store a token for all values (I used ___ and included _ in index charset_table)

  2. Used a custom ranker to remove the weight of this field in matching

    OPTION ranker=expr(‘sum(lcs*user_weight)*1000 + BM25F(1.2,0.75,{dummy_match=0,name=100,category=25,brand_name=50})’);

  3. When searching used an expression like MATCH(‘abc|def|___‘)

It seems to be working well so far.

2 Likes