Using distinct with large records in algoliasearch-rails


We are looking to index long articles in our Rails site. Best I can tell, the recommended practice is to split the articles up into paragraphs and create a new record for each paragraph.

How can I do that with the algoliasearch-rails gem? Do I have to use the bare ruby api, or is there some trick I can do to get it to work with the rails api?


You’re having the same idea / question / issue than another community member.
See .

The TL;DR answer is that the gem currently doesn’t support a way of handling this and that you should probably use the algoliasearch gem directly in your case.

We’d be more than happy to have an alternative to offer though. If you see a way of extending the rails gem to support your use case, please feel free to jump in this thread. :slight_smile: