Searching articles within a specific category returns results from other categories also.
We're using an API to search articles. Our requirement is to search for articles (on the basis of a keyword) throughout one of my category. We have 2-3 categories added on our support. However when we Search for Articles only restricting the search to a specific category, I get result articles from other categories too.
API:
URl : {{zendeskUrl}}/api/v2/help_center/articles/search.json
Params :
{
query: {search_term},
category: {category_id}
}
Why does this happen? Is there any way to avoid it?
Or, is there anything I'm doing wrong with the API?
Ref :
1. Filter By Category
-
Hi Raghav,
Looking at what you've tried your search query looks fine and I wouldn't normally expect any articles from another category to be listed.
I quickly tested this myself on my own test account using /api/v2/help_center/articles/search.json?query={query}&category={category_id} as well but the results returned only included the results in that specific category.
The only other thing I can mention is that if you have a localized Help Center and have content in multiple languages the search will use your default language. If you're wanting to filter for a specific language then you'll need to also pass the {locale} id to ensure the correct results are also being returned.
If you're still observing any unexpected results or discrepancies please feel free to let us know and we can most certainly help to take a closer look!
Best regards,
Nhia. -
Hi Nhia Lor
Thanks for the response on this. I'll try setting the locale to "en-us" but as far as I know, We have a single Help Center with only a single Locale.
サインインしてコメントを残してください。
2 コメント