On 6/20/07, Yonik Seeley <[EMAIL PROTECTED]> wrote:
On 6/20/07, Michael Plax <[EMAIL PROTECTED]> wrote: > This is a log that I got after runnning SolrSharp example. I think example > program posts not properly formatted xml. > I'm running Solr on Windows XP, Java 1.5. Are those settings could be the > problem? Solr1.2 is pickier about the Content-type in the HTTP headers. I bet it's being set incorrectly.
Ahh, good point. Within SolrSearcher.cs, the WebPost method contains this setting: oRequest.ContentType = "application/x-www-form-urlencoded"; Looking through the CHANGES.txt file in the 1.2 tagged release on svn: 9. The example solrconfig.xml maps /update to XmlUpdateRequestHandler using the new request dispatcher (SOLR-104). This requires posted content to have a valid contentType: curl -H 'Content-type:text/xml; charset=utf-8'. The response format matches that of /select and returns standard error codes. To enable solr1.1 style /update, do not map "/update" to any handler in solrconfig.xml (ryan) For SolrSearcher.cs, it sounds as though changing the ContentType setting to "text/xml" may fix this issue. I don't have a 1.2 instance to test this against available to me right now, but can check this later. Michael, try updating your SolrSearcher.cs file for this content-type setting to see if that resolves your issue. thanks, jeff r.