about summary refs log tree commit diff
path: root/tests/search_native_shapes.rs
diff options
context:
space:
mode:
authorAlexander_Kabui <alexanderkabui@proton.me>2026-11-17 12:11:19 +0300
committerAlexander_Kabui <alexanderkabui@proton.me>2026-11-17 14:06:50 +0300
commitf76043bf82b6c86b5e844b27b53e957d770aeb33 (patch)
tree5b4257c2523410f077e9fbc4f71f3fd797360b9f /tests/search_native_shapes.rs
parente13bbd27d0b7addd277d0f50d9e90fee2a936211 (diff)
downloadgenenetwork4-search/extract-engine.tar.gz
* src/search (engine): no default arm, so a wrong name is refused. search/extract-engine
An unrecognised SEARCH_ENGINE used to fall through to the gn3 proxy, which
turned a typo into a silently different engine. The arms are now explicit -
"crate"/"native" for the in-process engine, "forward" for the proxy - and
anything else returns the value it was given. src/search/native.rs is deleted;
the former name resolves through the same arm.
Diffstat (limited to 'tests/search_native_shapes.rs')
-rw-r--r--tests/search_native_shapes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/search_native_shapes.rs b/tests/search_native_shapes.rs
index 7358ed3..c0bcae7 100644
--- a/tests/search_native_shapes.rs
+++ b/tests/search_native_shapes.rs
@@ -47,7 +47,7 @@
 //! set it to ~/spikes/index-self-build/xapian-index); the test skips
 //! loudly when unset so the hermetic suites stay green.
 
-use genenetwork4::search::{Engine, SearchError, SearchHit, native::Native};
+use genenetwork4::search::{Engine, SearchError, SearchHit, gnindex::CrateEngine};
 
 /// The recorded behavior class this gate asserts (see module doc).
 #[derive(Clone, Copy, PartialEq, Eq)]
@@ -224,7 +224,7 @@ async fn native_engine_shape_class_gate() {
     let mut passed = 0usize;
     let mut failed = Vec::new();
     for (id, query, type_, expected) in SHAPES {
-        let result = Native.search(query, type_, 100, 1).await;
+        let result = CrateEngine::from_config().search(query, type_, 100, 1).await;
         match (expected, &result) {
             (Class::Match200, Ok(hits)) => {
                 // Dev-index counts are REFERENCE DATA ONLY (AMENDMENT B):