Comma Separated values to use each as a facet

Hello,

Got an field in Algolia as -
{

“tags”: “online,health,others”

}

Now, I want to use “tags” as a facet, but with each comma separated values as an facet item. Like -

tags

online822
health20
others338

But its coming as -

tags

online,health,others500

Please Help!! Thanks in advance.

Hi,

If you want to index all tags as distinct facet values, you need to change the formatting of your record.

Instead of:

"tags": "online,health,others"

you need to index as an array like this:

"tags": [
  "online",
  "health",
  "others"
]

As soon as you do that Algolia will pick them up separately.

Thanks for your reply. I have done that way and it works fine.