Show facet values even for empty queries

This commit is contained in:
Clément Renault 2021-01-03 14:18:15 +01:00 committed by Kerollmops
parent 3916c54501
commit 2cd8675734
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -4,7 +4,6 @@ var timeoutID = null;
$('#query, #facet').on('input', function () {
var query = $('#query').val();
var facet = $('#facet').val();
let fetchFacetDistribution = query.trim() !== "" || facet.trim() !== "";
var timeoutMs = 100;
if (timeoutID !== null) {
@ -17,7 +16,7 @@ $('#query, #facet').on('input', function () {
url: "query",
contentType: 'application/json',
data: JSON.stringify({
'query': query, 'facetCondition': facet, "facetDistribution": fetchFacetDistribution
'query': query, 'facetCondition': facet, "facetDistribution": true
}),
contentType: 'application/json',
success: function (data, textStatus, request) {