How do I get the number of hits from a numeric filter using Vue Instant Search?
I have an instant search instance:
<ais-instant-search :search-client="searchClient" index-name="pages"> <ais-configure :numeric-filters.camel="numericFilters">
numericFilters returning either
['time > 10000000']. It does this with a checkbox:
<input type="checkbox" v-model="showNewPosts" id="show-new-posts" /> <label for="show-new-posts">New posts (X)</label>
And a computed property that changes when
showNewPosts is ticked.
The designs have the checkbox above an
ais-refinement-list, so in order to make this match with them, I’d like to have brackets next to the label with the number of results if it is checked:
- New posts (3)
- Science (5)
- Sports (7)