Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Document contains at least one immense term - Solr

Tags:

solr

I am using solr library to be indexing my documents. It is working as expected but sometimes I am getting below error. Could you please help with this?

Document contains at least one immense term in field="FileContent_en***" (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: '[110, 97, 109, 101, 61, 34, 97, 99, 113, 117, 105, 115, 105, 116, 105, 111, 110, 115, 116, 111, 114, 101, 34, 62, 101, 106, 122, 107, 118, 118]...', original message: bytes can be at most 32766 in length; got 422071. Perhaps the document has an indexed string field (solr.StrField) which is too large solr.StrField

Thank you in advance

like image 575
Rajesh Somvanshi Avatar asked Nov 15 '25 10:11

Rajesh Somvanshi


1 Answers

Change the field type of your field to text from string.

For example your field definition should be like below.

<field name="text" type="text_general" indexed="true" stored="true"/>

String (UTF-8 encoded string or Unicode). Strings are intended for small fields and are not tokenized or analyzed in any way. They have a hard limit of slightly less than 32K.

like image 167
Abhijit Bashetti Avatar answered Nov 17 '25 10:11

Abhijit Bashetti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!