mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 10:16:42 +00:00
remove 'must match'
This commit is contained in:
parent
d761a3b595
commit
b0a868bb73
File diff suppressed because one or more lines are too long
@ -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: {
|
||||
|
@ -24,10 +24,7 @@
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<span onclick="document.getElementById('barToggle').click()">Must match </span>
|
||||
<input title="Toggle between 'Should' and 'Must' match mode" type="checkbox" id="barToggle"
|
||||
onclick="toggleSearchBar()" checked>
|
||||
<span onclick="document.getElementById('fuzzyToggle').click()">  Fuzzy </span>
|
||||
<span onclick="document.getElementById('fuzzyToggle').click()">Fuzzy </span>
|
||||
<input title="Toggle fuzzy searching" type="checkbox" id="fuzzyToggle"
|
||||
onclick="toggleFuzzy()" checked>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user