Invalid document size. It shouldn't be bigger than 100KB

104 views Asked by At

I'm using Searchify on Heroku with Tanker as my gem. When I try to run an reindex on certain models I get an invalid document size error. I've tried to change the batch size, but no luck.

Model.tanker_reindex(:batch_size => 1000)
1

There are 1 answers

0
Chris Lamprecht On BEST ANSWER

The total combined size of all of your text fields must be under 100KB. When indexing, just verify that your documents are within this limit.

When using the Tanker gem, it doubles the size of most documents, because it copies the text fields into a single field called __any (it may provide a way to customize & override this behavior). You could also use the straight Ruby IndexTank client, which gives you some more control over indexing (but doesn't do as much automatically):

http://www.searchify.com/documentation/ruby-client

https://github.com/flaptor/indextank-rb