help with storing large text fields
- dnikolaParticipant5 years, 8 months ago #9679
Hello there,
When I try to index custom post which has some meta fields with large amount of transcript text I got an error
Solr HTTP error: OK (400) { “responseHeader”:{ “status”:400, “QTime”:95}, “error”:{ “metadata”:[ “error-class”,”org.apache.solr.common.SolrException”, “root-error-class”,”org.apache.lucene.util.BytesRefHash$MaxBytesLengthExceededException”], “msg”:”Exception writing document id 17562 to the index; possible analysis error: Document contains at least one immense term in field=\”_transkript_str\” (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: ‘[90, 97, 115, 105, 106, 101, 100, 97, 110, 106, 101, 32, 80, 114, 118, 111, 103, 32, 107, 111, 110, 103, 114, 101, 115, 97, 32, 74, 101, 100]…’, original message: bytes can be at most 32766 in length; got 128127. Perhaps the document has an indexed string field (solr.StrField) which is too large”, “code”:400}}How I can resolve this issue?
Regards!
wpsolrKeymaster5 years, 8 months ago #9680Hello,
Your custom field “transkript” is setup with a Solr field type that cannot store more than 32K characters.
You need to change your field’s type in screen 2.2, and select instead the large text type “Text, if too long for other text types (cannot be used as facet)” in the dropdown list.
Do not forget to reindex all your data afterwards.
wpsolrKeymaster5 years, 7 months ago #10077Please replace WPSOLR with https://www.dropbox.com/s/dw5vqnr2j2q4ger/wpsolr-pro.zip?dl=0 (this link is valid for one hour)
It should prevent the “immense term” error, for Solr and Elasticsearch.
dnikolaParticipant5 years, 7 months ago #10113I am not getting notifications about replays but I was able to get this file from link even after more than 27h (just to know 😛 )
i activated this version but getting 500 error
i was able to get this from debug log
PHP Parse error: syntax error, unexpected end of file in /home/*******/httpdocs/wp-content/plugins/wpsolr-pro/wpsolr/pro/extensions/theme/layout/ion_range_slider/class-wpsolr-ui-layout-ion-range-slider.php on line 228
wpsolrKeymaster5 years, 7 months ago #10145Unfortunately, I cannot generate a new fix at the moment.
You can just edit the file /home/*******/httpdocs/wp-content/plugins/wpsolr-pro/wpsolr/pro/extensions/theme/layout/ion_range_slider/class-wpsolr-ui-layout-ion-range-slider.php, and replace <? with <?php at line 40.
Or enable php short tags.
The fix will come officially in release 21.3.
You must be logged in to reply to this topic.