From cf13a11d4aa8e81153f7a83ebb9ec9829f20636e Mon Sep 17 00:00:00 2001 From: Joan Antoni RE Date: Wed, 23 Oct 2024 13:08:28 +0200 Subject: [PATCH] Fix vector search metadata serialization --- nidx/nidx_vector/src/data_point/mod.rs | 2 +- nucliadb_vectors/src/data_point/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nidx/nidx_vector/src/data_point/mod.rs b/nidx/nidx_vector/src/data_point/mod.rs index 46bd62cc82..8c8ce31cf5 100644 --- a/nidx/nidx_vector/src/data_point/mod.rs +++ b/nidx/nidx_vector/src/data_point/mod.rs @@ -630,7 +630,7 @@ impl Neighbour { } pub fn metadata(&self) -> Option<&[u8]> { let metadata = Node::metadata(&self.node); - metadata.is_empty().then_some(metadata) + (!metadata.is_empty()).then_some(metadata) } } diff --git a/nucliadb_vectors/src/data_point/mod.rs b/nucliadb_vectors/src/data_point/mod.rs index e992f225c5..0a4d0459f9 100644 --- a/nucliadb_vectors/src/data_point/mod.rs +++ b/nucliadb_vectors/src/data_point/mod.rs @@ -630,7 +630,7 @@ impl Neighbour { } pub fn metadata(&self) -> Option<&[u8]> { let metadata = Node::metadata(&self.node); - metadata.is_empty().then_some(metadata) + (!metadata.is_empty()).then_some(metadata) } }