1、需要在/usr/local/services/solr/solr-4.10.3/example/solr/collection1/conf的solrconfig.xml加上 <requestHandler name="/select" class="solr.SearchHandler"> <!-- default values for query parameters can be specified, these will be overridden by parameters in the request --> <lst name="defaults"> <str name="echoParams">explicit</str> <int name="rows">10</int> <str name="df">text</str> </lst> <!-- 这行代码非常重要,如果没有这行,拼写检查,是不起作用的--> <arr name="last-components"> <str>spellcheck</str> 以便spell能够生效 2、在/usr/local/services/solr/solr-4.10.3/example/solr/collection1/conf的schema.xml修改,加上字段,否则会报错 如: <field name="id"