Set attribute searchable in attributesForFacetting



In order to use refinementsList searchable option (as below):

To enable this feature, according to the doc, I must set an attribute as searchable in attributesForFacetting.

So, here is the array passed to the setSettings function (I use algoliasearch-client-php):

    'searchableAttributes' => [
    'attributesForFaceting' => [
    'attributesToRetrieve' => [
    'hitsPerPage' => 20

The problem: the API return a 400 and tell me that there is an error in the request near the “searchable(id_f_3)”

What is wrong ? Do you have an idea ?

Thank for the help!


Hey there, we need to see your data so I am reaching out directly via email and will report anything here when relevant

1 Like

Fixed !

My settings array which was poorly formatted. I fix it by rebuild the entire array in my PHP script.

Thanks a lot for the help !
Great support.

1 Like