Search for categories (Elasticsearch)

Hi,

I’m trying to perform a search for categories, but whatever I do I get an empty result.

I’m using CategorySearchService, which is implemented in the elasticsearch project by default. The search query is cloned from RequestModelAccessor. I’ve tried to set the SearchType to “Category”. I’ve also tried to set PageSize and set the Text to something that I know will give me a result if use the quick search on the site, but for some reason I get no items.

The reason I want to do this is to find categories with a value for a specific field, but I don’t want to first get all categories for the assortment and then filter that list. It would be most efficient to index this value and then use elasticsearch to find it.

Litium version: 8.0

Apparently, CategoryShowRecursively had to be set to true.

This issue is resolved.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.