From 0e1ae7554f40cf7d73f58942d05a5f661d208ef5 Mon Sep 17 00:00:00 2001 From: Philipp Ahlner Date: Wed, 18 Jan 2023 13:24:46 +0100 Subject: [PATCH] Fixes error message when lat/lng are unparseable --- milli/src/update/index_documents/enrich.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/src/update/index_documents/enrich.rs b/milli/src/update/index_documents/enrich.rs index 3331497c9f..4b400b8f62 100644 --- a/milli/src/update/index_documents/enrich.rs +++ b/milli/src/update/index_documents/enrich.rs @@ -98,7 +98,7 @@ pub fn enrich_documents_batch( // If the settings specifies that a _geo field must be used therefore we must check the // validity of it in all the documents of this batch and this is when we return `Some`. let geo_field_id = match documents_batch_index.id("_geo") { - Some(geo_field_id) if index.sortable_fields(rtxn)?.contains("_geo") => Some(geo_field_id), + Some(geo_field_id) if index.sortable_fields(rtxn)?.contains("_geo" ) || index.filterable_fields(rtxn)?.contains("_geo" ) => Some(geo_field_id), _otherwise => None, };