Records not showing on second index SOLVED

Hello,
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:

https://gyazo.com/916b1074923eddc74521f7559b25a83e

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

https://gyazo.com/3c1d4edf060d7bb40c7b49d18434f7ff

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)

templates/page.cv.liquidhttps://drive.google.com/open?id=0Byn2_4cMe40WSFVHclFfR0tudlk

assets/algolia_cv.jshttps://drive.google.com/open?id=0Byn2_4cMe40WNXRWMU1jOTRvRjg

And I’ve added somes lines below <!-- /Algolia head --> generated lines in the Layout/theme.liquidhttps://drive.google.com/open?id=0Byn2_4cMe40WVmcxZUlGc3lyR1U

Here is the small line missing compared to algolia_instant_search.js:

 instant.search.templatesConfig.compileOptions = 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: