Replicating indices but with filtered locale articles

Hello! My name is Phillip and I am a developer working with a client who uses your software. I had a quick question, currently, the client has different language websites and is wanting their zendesk articles to populate in search for the appropriate websites.

To have them populate the results I am replicating the "master " zendesk index which is “zendesk_turtlebeachhelp_articles.tmp” . So for the nederlands site I am replicating the master index and renaming the copy in the locale of the desired site so in this instance for the nederland site I am renaming it “shopify_nl_zendesk_”. Which works but I am running into issues with the autocomplete showing English and other languages.

My question is is there a way to replicate the master index and only export the appropriate languages? So the “shopify_nl_zendesk” only has articles with the locale of “nl” or is that something that I need to export from zendesk itself.

I appreciate the help and direction!

Thanks,

Phillip Scott

Hi Phillip!
I think you reached out to us at support@algolia.com, but for anyone else looking at this:

To create a second index containing only a subset of the records of the first one, you can use our Algolia CLI tool: https://github.com/algolia/algolia-cli. The ‘export’ command accepts a filter, that will allow you to export only the record relevant to a certain locale. You can then use the import command to index them to a new index.

To filter on a certain attribute you can use the search parameters option to add an additional filter. So as long as locale (or whatever the attribute is) is an attribute set for faceting in your records, you could pass in {“filters”:“locale:XX”} as an Algolia param on the export command.

1 Like