Skip to content

Commit

Permalink
Update demo and service for planet
Browse files Browse the repository at this point in the history
  • Loading branch information
ellenhp committed Feb 10, 2024
1 parent 7f5bc63 commit 0b1ca01
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion airmail/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion airmail_service/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async fn search(
)
}
})
.take(2)
.take(3)
.flatten()
.collect();

Expand Down
3 changes: 2 additions & 1 deletion airmail_site/src/components/Demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 0b1ca01

Please sign in to comment.