London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Using Content Search Api with category filter always returns no records.

Vote:
 

I have this request that I am trying to fetch data with but I always get no records when calling the api.

https://localhost:8080/api/episerver/v3.0/search/content?filter=category/value/name eq 'TestCategory'

I followed the api documentation where it says to have the following format:

?filter=category/value/name eq 'Category Name'

But with no prevail. I did try to fetch my content using a query parameter and it works fine. 

Am I doing something wrong in the query above? Any help is appreciated.

#311413
Oct 25, 2023 6:23
Vote:
 

Sometimes categories are indexed differently, our categories looks like this in the index.

"category": [
    {
        "name": "TestCategory",
        "description": "TestCategory",
        "id": 12
    }
],

In this case the query should not include the value path

https://localhost:8080/api/episerver/v3.0/search/content?filter=category/name eq 'TestCategory'

But check your index how your categories are stored.
#311437
Edited, Oct 25, 2023 20:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.