How can I integrate Solr5.1.0 with Nutch1.10

604 Views Asked by At

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

2

There are 2 best solutions below

0
On

try schema-solr4.xml instead of schema.xml

2
On

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.