Thanks for the helpful info Shawn.

I added   <str name="wt">xml</str> to the update request handler(as shown 
below) in solrconfig.xml and also for the query request handler. This does fix 
the problem.
I will go back and try it the way you suggest since it looks like a better way 
and would cover all the request handler types.

Another thing in my implementation is that I have six solr cores and each of 
them has its' own solrconfig.xml. I will need to make the change for each core.

Thanks again for the help,
George
=========================================================================
<initParams 
path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse,update">
    <lst name="defaults">
      <str name="df">text</str>
      <str name="wt">xml</str>
    </lst>
  </initParams>
=========================================================================

-----Original Message-----
From: Shawn Heisey <[email protected]> 
Sent: Wednesday, November 17, 2021 7:57 PM
To: [email protected]
Subject: [Non-DoD Source] Re: Solr upgrade 3.6.1 TO 8.10.1 : ERROR Data at the 
root level is invalid. Line 1, position 1.

On 11/17/21 9:16 AM, Heller, George A III CTR (USA) wrote:
>
> We have an existing ASP>NET C# application that currently uses Solr
> 3.6.1 for indexing and searching of documents. Using Solr 
> 3.6.1,everything works fine.
>
> I built a Solr 8.10.1 server and when I try to upload documents to a 
> Solr collection in 8.10.1, I get a "Data is invalid at root level"
> error. Any help with would be appreciated.
>

Scott's answer is very likely the problem.  Solr switched to JSON as the 
default response writer in version 7.0.  Before that it was XML.

You can either add a "wt" parameter set to "xml" in the SolrNET code, or 
add it to the defaults section of the handler definition in 
solrconfig.xml.  I have no idea how to get SolrNET to do it ... that 
client is third party, not developed by the Solr project.

The solrconfig.xml file developed by the dovecot team for their Solr 
integration has this as a top-level element (subordinate only to the 
"<config>" element) to switch the default back to XML:

   <queryResponseWriter name="xml"
     default="true"
     class="solr.XMLResponseWriter" />

Thanks,
Shawn


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to