Search code examples
solrsolrcloud

Solr 7.x "/export" response handler not working with Streaming Expressions


I am doing a Solr streaming expression, and I try to use the /export handler to fetch all of the results. Consider the following query:

search(main, q=*:*, fl="SSRN",qt="/export",sort="SSRN asc")

I configured my schema.xml for the SSRN field as follows:

<field name="SSRN" type="int" indexed="true" stored="true" required="false" multiValued="false" docValues="true" />

Since the SSRN field is a docValue, it should work. The results are just the standard 10 documents. This is running in a SolrCloud environment with just one node and one shard.

Thanks in advance!


Solution

  • I fixed the issue. It seems that in SOLR-8426: Enable /export, /stream and /sql handlers by default and remove them from example configs, they removed the need to add /export handler to the solrconfig.xml. If you do add it, then it doesn't work. The solution is just to remove this code (from solrconfig.xml):

    <requestHandler name="/export" class="solr.SearchHandler">
      <lst name="invariants">
      <str name="rq">{!xport}</str>
      <str name="wt">xsort</str>
      <str name="distrib">false</str>
      <lst name="defaults">
      <str name="echoParams">explicit</str>
      <str name="wt">json</str>
      <str name="indent">true</str>
      </lst>
    </requestHandler>