This commit is contained in:
Paul Masurel
2025-12-01 17:11:31 +01:00
parent d26d6c34fc
commit 79622f1f0b
2 changed files with 2 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ fn main() -> tantivy::Result<()> {
[(-99.49, 45.56), (-99.45, 45.59)],
tantivy::query::SpatialQueryType::Intersects,
);
let hits = searcher.search(&query, &TopDocs::with_limit(10))?;
let hits = searcher.search(&query, &TopDocs::with_limit(10).order_by_score())?;
for (_score, doc_address) in &hits {
let retrieved_doc: TantivyDocument = searcher.doc(*doc_address)?;
if let Some(field_value) = retrieved_doc.get_first(field) {

View File

@@ -586,6 +586,7 @@ impl IndexMerger {
// Get spatial writer and rebuild block kd-tree.
spatial_serializer.serialize_field(field, triangles)?;
}
spatial_serializer.close()?;
}
Ok(())
}