Reduces the algorithmic complexity of finding the documents containing N exact words from something that is exponential to something that is polynomial.
Cache intermediary results between different calls to the exactness criterion.
Performance Results
On the smol_songs.csv dataset, a request containing 10 common words now takes about 60ms instead of 5 seconds to execute. For example, this is the case with this (admittedly nonsensical) request: Rock You Hip Hop Folk World Country Electronic Love The.
Pull Request
Related issue
Fixes (partially) https://github.com/meilisearch/meilisearch/issues/3116
What does this PR do?
exactness
criterion.Performance Results
On the
smol_songs.csv
dataset, a request containing 10 common words now takes about 60ms instead of 5 seconds to execute. For example, this is the case with this (admittedly nonsensical) request:Rock You Hip Hop Folk World Country Electronic Love The
.