Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record at the position 1 objectID=56 is too big #375

Open
alphamarket opened this issue Jan 5, 2020 · 0 comments
Open

Record at the position 1 objectID=56 is too big #375

alphamarket opened this issue Jan 5, 2020 · 0 comments

Comments

@alphamarket
Copy link

alphamarket commented Jan 5, 2020

  • Rails version: v6
  • Algolia Rails integration version: 1.23.2
  • Algolia Client Version: 1.27.1
  • Language Version: 2.6.5

Description

As I mentioned at this StackOverflow question, I have a Note model which has a very long text in one of it's JSON fields, even though I have limited the attribute to the single id column I am getting the following error:

Error: Algolia::AlgoliaProtocolError (400: Cannot POST to https://XXXX.algolia.net/1/indexes/Note/batch: {"message":"Record at the position 1 objectID=56 is too big size=20715 bytes. Contact us if you need an extended quota","position":1,"objectID":"56","status":400} (400))

The current model looks like as below:

class Note < Record
  include Shared::ContentBasedModel

  algoliasearch disable_indexing: AppConfig.apis.algolia.disable_indexing do
    attributes :id
  end
end

As you can see I am only sending an id column in the model but still getting the error, I haven't review your codes but I think you sending the entire model to the server.

Steps To Reproduce

Have model with a JSON field and one of the JSON field's attribute have a long long text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant