I figured it out by passing this as the curl post fields
$postContent=array('wt'=>'json', 'indent'=>'true', 'stream.body'=> $xmldoc);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postContent);
On 10/20/11 8:15 AM, dan whelan wrote:
Hi,
I am trying to use the analysis request handler in php / curl and was
wondering if anyone could help point me in the right direction.
I would like to mimic this command-line example from the wiki but need
to do it with a variable instead of with a file on the filesystem.
curl
'http://localhost:8983/solr/analysis/document?wt=json&indent=true'
--data-binary @monitor.xml -H 'Content-type:text/xml; charset=utf-8'
When I build the document and post it using curl to /analysis/document
I get this error and I am not sure I understand it.
"Error 400 DocumentAnlysisRequestHandler expects a single content
stream with documents to analyze"
Can anyone help?
Thanks,
dan