Caused by: java.lang.IllegalArgumentException: Document contains at least one immense term in field="sort_rendered_item" (whose UTF8 encoding is longer than the max length 32766)
So I'm indexing some pretty big rendered content. The fulltext field, as all fields are from search_api, are sortable. drunken_monkey in irc "To avoid the confusion of D7, we just declare all fields sortable now, and it's the backend's problem how to do that."
The exception that is being thrown in SearchApiSolrBackend::indexItems(), ultimately caused by the error above. I guess it is because the whole fulltext is being used for the index. I understand that seach_api_db just uses the first 30 characters.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2852606.patch | 3.24 KB | mkalkbrenner |
#4 | 2852606-04.search_api_solr_fulltext_field_sort_size.patch | 1.11 KB | ekes |
Comments
Comment #2
ekes CreditAttribution: ekes as a volunteer commentedComment #3
mkalkbrennerComment #4
ekes CreditAttribution: ekes as a volunteer commentedSo yes if I drop that figure. Well I dropped it to 512 ;-) It indexes.
I'm not sure what a sensible figure is, but does a sort really need 30000 bytes or so? Seems pretty edge case.
Comment #5
arafalov CreditAttribution: arafalov as a volunteer commentedThe root issue here is that whatever definition is for sort_rendered_item, the content it gets is too large. Usually for text fields, this means you are feeding (for example) Chinese into English tokenizer and it tries to split on space, ending up with the whole text as one "word".
But as it is for sort field, I am assuming the field is actually defined as string instead. So then the question is what the expectations are. It does not make sense to sort by the whole long string, as you said. So, just sort by prefix.
And you can get to prefix in three ways.
Comment #6
mkalkbrenner32 chars should be enough :-)
Comment #8
mkalkbrenner