2

I replaced the Solr schema.xml with nutch schema.xml. But when I run Solr again,Solr log prints this error:

ERROR - 2015-06-09 09:54:30.279; [ ] org.apache.solr.core.CoreContainer; Error creating core [mycore]: Could not load conf for core mycore: Unknown fieldType 'int' specified on field cityConfidence. Schema file is /opt/solr-5.1.0/server/solr/mycore/conf/schema.xml org.apache.solr.common.SolrException: Could not load conf for core mycore: Unknown fieldType 'int' specified on field cityConfidence. Schema file is /opt/solr-5.1.0/server/solr/mycore/conf/schema.xml

Abhijit Bashetti
  • 8,518
  • 7
  • 35
  • 47
liujieke
  • 21
  • 1
  • Do not copy and replace schema.xml file. Just try to copy your required fields from nutch one to the solr one. – Ali Jun 09 '15 at 20:07

2 Answers2

1

The problem is that Nutch schema.xml file doesn't contains the field type int used by cityConfidence field. To solve this problem just include the followed line in your schema.xml file:

<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>

Make sure all field types used by your fields are declared in your schema.xml file.

Bruno dos Santos
  • 1,361
  • 1
  • 12
  • 21
  • yes,I add this to my schema.xml,but there are other error “ Unknown fieldType 'tdouble' specified on field cityConfidence.” I don't know whether I use the wrong schema.xml – liujieke Jun 09 '15 at 16:30
  • 2
    It's the same issue. You just need to add the following line to your `schema.xml` file: `` – Bruno dos Santos Jun 09 '15 at 16:33
0

try schema-solr4.xml instead of schema.xml

douglee
  • 11
  • 4