Is it possible to filter my results by boolean and date? (algolia)

243 views Asked by At

I am trying to filter my algolia results by boolean and date. The problem I have is that the results found do not match the items shown to the user.

Here is what I have so far:

transformItems(items) {
        
        return items.filter(item => {
          return (item.enabled === 0 || item.time_of_use_unix < moment().unix()) ? null : item;
        });
      },

This shows the right items, but does not update my results found number (nbHits).

Is there maybe another way to achieve this?

I found a link which describes something similar, but I don't know how to use it in vue js.

https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/how-to/filter-by-boolean/#applying-a-boolean-filter

If someone could help I would appreciate that.

1

There are 1 answers

0
TheNastyPasty On

Solved it with <ais-configure :filters="filters" />