diff --git a/airmail/src/index.rs b/airmail/src/index.rs index bc62a62..23113de 100644 --- a/airmail/src/index.rs +++ b/airmail/src/index.rs @@ -272,7 +272,7 @@ impl AirmailIndex { } } - let query = DisjunctionMaxQuery::with_tie_breaker(queries, 5.0); + let query = BooleanQuery::intersection(queries); let top_docs = searcher.search(&query, &TopDocs::with_limit(10))?; let mut results = Vec::new(); for (score, doc_address) in top_docs { diff --git a/airmail_service/src/main.rs b/airmail_service/src/main.rs index 289359f..85d059f 100644 --- a/airmail_service/src/main.rs +++ b/airmail_service/src/main.rs @@ -58,7 +58,7 @@ async fn search( ) } }) - .take(2) + .take(3) .flatten() .collect(); diff --git a/airmail_site/src/components/Demo.vue b/airmail_site/src/components/Demo.vue index 6b6bfa9..5f55983 100644 --- a/airmail_site/src/components/Demo.vue +++ b/airmail_site/src/components/Demo.vue @@ -16,7 +16,8 @@ async function fetchSearchResults(query) { const url = `https://api.airmail.rs/search?q=${query}`; const response = await fetch(url); const data = await response.json(); - var newPins = data.map((poi) => { + console.log(data); + var newPins = data.features.map((poi) => { return { "type": "Feature", "geometry": {