mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-27 07:14:26 +01:00
Merge pull request #172 from meilisearch/optimize-proximity-criterion
Optimize proximity criterion
This commit is contained in:
commit
5b9524e1ba
@ -55,7 +55,7 @@ impl<'t> Criterion for Proximity<'t> {
|
|||||||
if self.proximity as usize > *max_prox {
|
if self.proximity as usize > *max_prox {
|
||||||
self.state = None; // reset state
|
self.state = None; // reset state
|
||||||
} else {
|
} else {
|
||||||
let mut new_candidates = if candidates.len() <= 1000 {
|
let mut new_candidates = if candidates.len() <= 1000 && self.proximity > 0 {
|
||||||
if let Some(cache) = self.plane_sweep_cache.as_mut() {
|
if let Some(cache) = self.plane_sweep_cache.as_mut() {
|
||||||
match cache.next() {
|
match cache.next() {
|
||||||
Some((p, candidates)) => {
|
Some((p, candidates)) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user