Filters not working

I have the following code and when i do this without filters it worked. But now i want to add filters and the result (nBHits) is always 0. I use the algolia javascript.

this.companyIndex.search({
                    query: this.whatSearchQuery,
                    filters: 'category:Hotel'

                }, function searchDone(err, content) {
                    if (err) {
                        console.error(err);
                        return;
                    }
                    for (var h in content.hits) {
                        console.log(
                            `Hit(${content.hits[h].objectID}): ${content.hits[h].toString()}`
                        );
                    }
                });
            }

ok. solved it. i had to add the attributes in indices>display>faceting.