Rest API search locale

I if use the API /search?query=factuur&objects=KnowledgeBaseAnswerTranslation&limit=10 call i don’t get any results, even thought i have multiple Knowlegde Base articles with this word in it.

If i use the API /search?query=invoice&objects=KnowledgeBaseAnswerTranslation&limit=10 call, i see the KB articles i want to see.

All the KB articles are both in Dutch and English.

My question is if it is possible to force searching for Dutch or to search in both languages and how to change the API call to do so.

Thanks in advance.

Hey @MarkW ,

currently it looks like that with the zammad api it is not possible, since it only uses the user language for the locales it gathers:

zammad/app/models/knowledge_base/answer/translation/search.rb at 43c2242a282683dba6a616d0dc9146eda4a55fa4 · zammad/zammad · GitHub

I also checked my addon Rolfs-TableSearch, but with that you would need multiple REST requests to climb up to the tables and find the proper locales which will get inconvienient as well, since you only have postgres search.

Your best chance is maybe to access your elastic search server directly and query it manually without zammad between? Then you would have the pro’s of a nice search and could grab single data via official api.

Would this maybe an option?

1 Like

Hello @rolfschmidt ,

Thanks for your answer and your help.
For now it is working for us, but good to know why it is happening.

Mark

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