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.
This is a bug report used to push a small piece of code needed to fix remote extraction of attachments with tika.
This could have been set in the #1289222 patch but fits better here has it implies a modification on the search_api_solr classes to allow for a custom POST request with custom headers (content multi-part etc).
I'll attach the patch as soon as I get a bug id
Comment | File | Size | Author |
---|---|---|---|
#2 | search_api_solr-allow_abitrary_query-1580118-2.patch | 3.03 KB | Sutharsan |
#1 | search_api_solr-allow_abitrary_query-1580118-1.patch | 2.49 KB | regilero |
Comments
Comment #1
regilero CreditAttribution: regilero commentedSo here's the patch.
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedCode style fixes and function documentation (only). The function description could use some extra explanation.
Comment #3
gp.mazzola CreditAttribution: gp.mazzola commentedHi, the new update of the Search API Solr search module to rc4, with the removed dependency on the SolrPhpClient library, breaks this patch, that I was using combined to a patch on Search API Attachments module, to allow remote extraction of files on the machines where Solr/Tomcat live.
Is it possible to update this patch to work with the new rewritten module? Otherwise, could this patch be committed to the module, to allow remote extraction feature?
Comment #4
lotyrin CreditAttribution: lotyrin commentedComment #5
drunken monkeyMight it be that
SearchApiSolrConnection::makeServletRequest()
already does what you want?Otherwise, maybe we could add a method for that to the connection class, yes. (Or, rather, make the method for that public.)
Comment #6
gp.mazzola CreditAttribution: gp.mazzola commentedHello drunken monkey, I am reading your answer only now.
The patch to search_api_attachments, add this code to allow remote file extraction on the solr machine:
This function calls $solr->sendHttpRequest('extract/tika'. $query_string, 'POST', $headers, $data, FALSE); which was introduced by another patch on the search_api_solr module (solr_connection.inc file)
Do you think that the method you suggest, could do the job? Or do you need to add another method to the connection class?
Comment #7
drunken monkeyYes, I'm fairly certain. Just try it and report back, please.
Comment #8
torpy CreditAttribution: torpy commentedThanks for the pointer! Posted a working patch making use of makeServletRequest in #1289222: Allow remote document processing (comment #15).
Comment #9
OanaIlea CreditAttribution: OanaIlea at bio.logis Genetic Information Management GmbH commentedThis issue was closed due to lack of activity over a long period of time. If the issue is still acute for you, feel free to reopen it and describe the current state.