Records not showing on second index SOLVED

I’m implementing an Algolia search in my website, and everything is showing off (maps, hits, etc.) but not the actual attributes of my records (name, profesion, etc.).
I’ve deployed this search elsewhere on the web and it works perfectly fine.
I think it is linked with the hogan.js templating that Shopify and Algolia are using but I’m not sure.

Here’s a screenshot of my shopify search:

Here’s a screenshot of the same index that should be rendering the same (apart from CSS) :

It seems like you’re using [[ ]] syntax, which can be used, but with modification.
Can you try with curly braces instead {{ }}.
If this doesn’t work, can you post your code ? :slight_smile:

​Thanks for your quick answer @Jerska ​:wink:​

Actually, I’ve used the {{ }} before, but it does not work, so I’ve tried to do it with [[ ]] instead.

Here’s my code (I had a 403 error when I’m trying to put it in markdown directly)



And I’ve added somes lines below <!-- /Algolia head --> generated lines in the Layout/theme.liquid

Here is the small line missing compared to algolia_instant_search.js: = algolia.hoganOptions;

So in your code, I think it should be like this:

 search.templatesConfig.compileOptions = algoliaShopify.hoganOptions;

This will allow you to compile Hogan templates with the [[ ]] syntax. :slight_smile:

Great it works perfectly !!

Thanks !

1 Like

Awesome! Let us know if we can help you with anything else. :slight_smile: