mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-24 21:50:07 +01:00
Fix proximity graph edge builder to include all proximities
This commit is contained in:
parent
1db152046e
commit
aa414565bb
@ -108,7 +108,7 @@ pub fn visit_to_node<'transaction, 'from_data>(
|
|||||||
|
|
||||||
if updb2 {
|
if updb2 {
|
||||||
for word1 in derivations1.clone() {
|
for word1 in derivations1.clone() {
|
||||||
for proximity in 0..(7 - ngram_len2) {
|
for proximity in 1..=(8 - ngram_len2) {
|
||||||
let cost = (proximity + ngram_len2 - 1) as u8;
|
let cost = (proximity + ngram_len2 - 1) as u8;
|
||||||
if db_cache
|
if db_cache
|
||||||
.get_word_prefix_pair_proximity_docids(
|
.get_word_prefix_pair_proximity_docids(
|
||||||
@ -139,7 +139,7 @@ pub fn visit_to_node<'transaction, 'from_data>(
|
|||||||
let product_derivations = derivations1.cartesian_product(derivations2);
|
let product_derivations = derivations1.cartesian_product(derivations2);
|
||||||
|
|
||||||
for (word1, word2) in product_derivations {
|
for (word1, word2) in product_derivations {
|
||||||
for proximity in 0..(7 - ngram_len2) {
|
for proximity in 1..=(8 - ngram_len2) {
|
||||||
let cost = (proximity + ngram_len2 - 1) as u8;
|
let cost = (proximity + ngram_len2 - 1) as u8;
|
||||||
// TODO: do the opposite way with a proximity penalty as well!
|
// TODO: do the opposite way with a proximity penalty as well!
|
||||||
// search for (word2, word1, proximity-1), I guess?
|
// search for (word2, word1, proximity-1), I guess?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user