remove 'must match'

This commit is contained in:
2019-11-08 21:46:54 -05:00
parent d761a3b595
commit b0a868bb73
3 changed files with 5 additions and 12 deletions

View File

@@ -32,10 +32,6 @@ window.onload = () => {
})
};
function toggleSearchBar() {
searchDebounced();
}
function toggleFuzzy() {
searchDebounced();
}
@@ -222,7 +218,7 @@ function search() {
let query = searchBar.value;
let empty = query === "";
let condition = $("#barToggle").prop("checked") && !empty ? "must" : "should";
let condition = empty ? "should" : "must";
let filters = [
{range: {size: {gte: size_min, lte: size_max}}},
{terms: {index: selectedIndices}}
@@ -275,7 +271,7 @@ function search() {
content: {},
name: {},
"name.nGram": {},
// font_name: {},
font_name: {},
}
},
aggs: {