Closed (fixed)
Project:
Apache Solr Attachments
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Jun 2009 at 18:31 UTC
Updated:
10 Nov 2009 at 22:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedYes, the goal is to have that as an option to do the extraction remotely - so your suggestion is very much on the roadmap!
Comment #2
anarchivist commentedGreat! I've found that the ExtractingRequestHandler is pretty trivial to set up.
Comment #3
anarchivist commentedOne question/concern I had was about indexing large files - is storing them in body appropriate? Would an indexed but non-stored field be more appropriate?
Comment #4
pwolanin commentedI think it needs to be stored so that the highlighter can work on it.
Comment #5
pwolanin commentedin terms of remote extract, oe thing to add will probably be local caching (in DB or files) of the extracted text, so that one doesn't need to send the file over again for extraction if just the meta-data like taxonomy is updated.
I don't think we want to index directly into Solr via the request handler, since then we'd have to rewrite the PHP library in terms of sending over other POST variables.
Comment #6
anarchivist commentedI don't think local caching is necessary - one way to check would just be to check the file size or update time...
Comment #7
pwolanin commentedI strongly disagree - imagine you send a 10 MB PDF (e.g. with lots of images) and get ~5 kB of text back. It would be very silly not to locally cache the extracted text vs. waiting for the upload and processing time any time the related node or meta data was updated.
Comment #8
pwolanin commentedHere's a start on this - just setting the groundwork.
Comment #9
pwolanin commentedplaying with this today - looks like we relly need to post multi-part for data like described:
http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1
Here's the solrconfi.xml stanza I'm using (need to update the patch).
I had to copy jar files around to get it to work with multi-core
see: http://wiki.apache.org/solr/ExtractingRequestHandler
Comment #10
pwolanin commentedArgh - this is not really working, but a start.
Comment #11
pwolanin commentedComment #12
pwolanin commentedrequires this patch to work: http://drupal.org/node/612024#comment-2190226
with revised solrconfig patch and some other refactoring.
Comment #13
pwolanin commentedfinally figuring out how to format the POST body correctly required resorting to running tcpdump and posting a document to extract with curl following the solr wiki example. For future ref, I did a tcpdump on the localhost will running solr on my laptop:
Comment #14
pwolanin commentedComment #15
pwolanin commentedcommitted to HEAD, leaving issue open for any minor follow-up
Comment #16
pwolanin commentedminor cleanup patch committed. let's call this done for now.