Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I see the module has the option to limit the number of bytes which will be indexed, Number of first N bytes to index in the extracted string.
https://www.drupal.org/project/search_api_attachments/issues/2888827 . However this is limited to 99999 bytes.
I'd like to submit a patch increasing this limit. In our case this will allow us to index as much data as possible without passing a certain size (~1MB) which is causing 413 errors when sending to solr containers.
Comment | File | Size | Author |
---|---|---|---|
#9 | increase_max_size_limit-3015359-9.patch | 3.07 KB | weemondo |
#7 | increase_max_size_limit-3015359-6.patch | 3.08 KB | weemondo |
Comments
Comment #2
izus CreditAttribution: izus commentedI'm ok with increasing the limit
please submit the patch
Thanks
Comment #3
izus CreditAttribution: izus commentedincreased it to 99999 , that's almost 1 MB
Comment #5
izus CreditAttribution: izus commentedComment #6
weemondo CreditAttribution: weemondo as a volunteer and at Square360, Inc. commentedApologies for reopening, and apologies for not submitting my patch sooner. But I think we should make the limit more flexible, in my case my limit was 1MB, but others may have a different limit. The patch here makes the extracted limit behave more like the upload limit to allow the extracted limit to be specified in text eg 100, 10 KB 10 MB.
Comment #7
weemondo CreditAttribution: weemondo as a volunteer and at Square360, Inc. commentedAttaching patch this time
Comment #8
izus CreditAttribution: izus commentedHi,
i didn't test it or dit a full code review but here is a quick mention that i noticed
This is not true : it's available for all extraction methods not only solr.
Comment #9
weemondo CreditAttribution: weemondo at Square360, Inc. commentedAha, good point! Updated to remove reference to solr.
Comment #11
izus CreditAttribution: izus commentedhi,
it is now merged
i also refactored the code to use the same validator helper method for number_first_bytes and max_filesize settings