haystack icon indicating copy to clipboard operation
haystack copied to clipboard

max_bytes_length_exceeded_exception', 'reason': 'bytes can be at most 32766 in length; got 48198' while using elastic search documentstore

Open monika1800 opened this issue 5 years ago • 2 comments

Describe the bug Unable to index the data to elastic search documenstore. Facing the below error with max_bytes_length_exceeded_exception exception.

Error message 'status': 400, 'error': {'type': 'illegal_argument_exception', 'reason': 'Document contains at least one immense term in field="Simpplr__Text_Intro__c" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: '[60, 104, 49, 62, 60, 115, 116, 114, 111, 110, 103, 62, 72, 105, 103, 104, 108, 105, 103, 104, 116, 115, 60, 47, 115, 116, 114, 111, 110, 103]...', original message: bytes can be at most 32766 in length; got 48198', 'caused_by': {'type': 'max_bytes_length_exceeded_exception', 'reason': 'bytes can be at most 32766 in length; got 48198'}

System:

  • OS: Ubuntu 20.01
  • GPU/CPU: CPU
  • Haystack version (commit or version number):
  • DocumentStore: Elastic Search
  • Reader: -
  • Retriever: Embedding

monika1800 avatar Jun 09 '21 10:06 monika1800

Hey @monika1800 , Seems like you have one very long field in one of your documents. Can you maybe try to narrow it down to the document that throws this error? From the elasticsearch logs it seems to be a field named Simpplr__Text_Intro__c but not sure if you one that is really named like this :thinking: ?

tholor avatar Jun 14 '21 16:06 tholor

Hi @tholor, This issue was observed due to lot of html tags present in the original content. After cleaning the html tags the size of the content has reduced and it was no more throwing this error. This issue can be closed.

monika1800 avatar Jul 06 '21 14:07 monika1800