On Tue, Jan 5, 2010 at 2:25 PM, Giovanni Fernandez-Kincade <gfernandez-kinc...@capitaliq.com> wrote: > Really? Doesn't it have to be delimited differently, if both the file > contents and the document metadata will be part of the POST data? How does > Solr Cell tell the difference between the literals and the start of the file? > I've tried this before and haven't had any luck with it.
Thanks Shalin. And Giovanni, yes it definitely works. This will set literal.mydata to the contents of mydata.txt curl "http://localhost:8983/solr/update/extract?literal.id=doc1&uprefix=attr_&fmap.content=attr_content&commit=true" -F "myfi...@tutorial.html" -F "literal.mydata=<mydata.txt" Unfortunately I could not get the UTF-8 encoding to work property. It's probably a curl or o/s configuration issue. I tried mydata.txt with and without BOM and I can do a "more mydata.txt" command and the special characters display correctly on my terminal set to UTF-8 but they get screwed up when indexed. I gave up in the end and went back to putting it urlencoded in the url. Ross > > -----Original Message----- > From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] > Sent: Monday, January 04, 2010 4:28 AM > To: solr-user@lucene.apache.org > Subject: Re: Solr Cell - PDFs plus literal metadata - GET or POST ? > > On Wed, Dec 30, 2009 at 7:49 AM, Ross <tetr...@gmail.com> wrote: > >> Hi all >> >> I'm experimenting with Solr. I've successfully indexed some PDFs and >> all looks good but now I want to index some PDFs with metadata pulled >> from another source. I see this example in the docs. >> >> curl " >> http://localhost:8983/solr/update/extract?literal.id=doc4&captureAttr=true&defaultField=text&capture=div&fmap.div=foo_t&boost.foo_t=3&literal.blah_s=Bah >> " >> -F "tutori...@tutorial.pdf" >> >> I can write code to generate a script with those commands substituting >> my own literal.whatever. My metadata could be up to a couple of KB in >> size. Is there a way of making the literal a POST variable rather than >> a GET? > > > With Curl? Yes, see the man page. > > >> Will Solr Cell accept it as a POST? > > > Yes, it will. > > -- > Regards, > Shalin Shekhar Mangar. >