I see pushed attributes but cant see the attributes retrieved on json when search

I see pushet attributes but cant see the attributes retreived on json when search

For example:
“query” : “330”,
“hits” : [{

“in_stock” : 1
“brand” : “Amana”,

“nbHits” : 1,

I can see the “brand” : “Amana”, value at the algolia indexes aministrative panel

But whan I retreive the json from “http://70ck1hpcgj-dsn.algolia.net/1/indexes/*/queries?x-algolia-agent=Algolia…” whan I searh a product, I do not see the “brand” value, how to add it?
I use magento 2 extension

Hello @tereta.alexander,

do you have set brand attribute as retrievable?

If I whant to send my own value (not created attribute of a product) I can add it to the PublicHelper.php :: getObject() but I need to retreive the value. Something I should transfer also, but where I can find that value in code as instance?

Hello @tereta.alexander,

I see now. Those attributes to retrieve are added to secured API key which is then used for search.
The API key is generated here.

What you need to do is to add your custom attributes to attributesToRetrieve so its added to the key and then fetched on search.
It can be done in a clean way via algolia_get_retrievable_attributes custom event.

1 Like