Virtual replica different number of matches under same query

Hello everyone, I’m about to start using algolia on my production environment but I have a slight issue regarding the number of matches when querying an index and its replicas.
The replicas were created using the python client:

index.set_settings({

    'replicas': [

        f'virtual({desc_index})',

        f'virtual({asc_index})'

    ]

    })

    replica_index = client.init_index(desc_index)

    replica_index.set_settings({

    'customRanking': [

        'desc(sale_price)'

    ]

    })

    replica_index_asc = client.init_index(asc_index)

    replica_index_asc.set_settings({

    'customRanking': [

        'asc(sale_price)'

    ]

    })

But for the same query on the different indexes I’m getting:

  • <index_1> : 201 matches
  • <index_1_price_asc>: 201 matches
  • <index_1_price_desc>: 306 matches

Is this expected algolia behavior? or am I missing any type of configuration lines on the python script?

Nevermind, I just noticed that the index_1 and the price asc index had distinct : 1 setting enabled. The other index did not. I’m not sure why that happened since both reeplicas were created the same way but at the end I’m getting now the same number of matches on all 3 indexes =).

1 Like