Search code examples
debuggingsolrckan

Solr: Setting defaultSearchField in schema not supported since Solr 7


Describe the bug

When trying to add a Solr core with the CKAN schema.xml on Solr I get an error:

Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: Setting defaultSearchField in schema not supported since Solr 7


Solution

  • CKAN version 2.9

    Describe the bug

    When trying to add a Solr core with the CKAN schema.xml on Solr 8 you will get an error:

    Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: Setting defaultSearchField in schema not supported since Solr 7

    image

    CKAN schema.xml includes text

    Steps to reproduce

    1. Go to the schema.xml file, in my case its found here /var/solr/data/ckan/conf/schema.xml

    2. Then, sudo nano /var/solr/data/ckan/conf/schema.xml

    3. Change

      text

    to

    <df>text</df>
    <solrQueryParser q.op="AND"/>
    

    Note: The defaultSearchField parameter in the schema is no longer supported. Use the df parameter instead. This option had been deprecated for several releases.