Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache Solr无法为我的表编制索引_Apache_Solr_Lucene - Fatal编程技术网

Apache Solr无法为我的表编制索引

Apache Solr无法为我的表编制索引,apache,solr,lucene,Apache,Solr,Lucene,我的solr主页没有显示任何错误。但它并没有从所需的表格中获取信息 DATA-CONFIG.XML <dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/market_place" user="root" password="student" batchSize="1" /> <docume

我的solr主页没有显示任何错误。但它并没有从所需的表格中获取信息

DATA-CONFIG.XML

<dataConfig> 
 <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/market_place" user="root" password="student" batchSize="1" />  
 <document name="persons">   
  <entity name="courses" query="SELECT * FROM courses">    
   <field column="id" name="id"/>    
   <field column="name" name="name"/>    
   <field column="duration" name="duration"/>    
   <field column="fee" name="fee"/>    
  <!-- <field column="UNIVERSITY" name="university"/>   -->
  </entity>  
 </document>
</dataConfig>

我在solrconfig.xml中所做的更改

 <lib dir="../../contrib/dataimporthandler/lib" regex=".*\.jar" />
  <lib dir="../../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />

  <lib dir="../../dist/" regex="mysql-connector-java-\d.*\.jar" />



 <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
 <lst name="defaults">  
 <str name="config">data-config.xml</str>
 </lst> 
  </requestHandler>

data-config.xml
schema.xml中的更改

 <field name="id" type="string" indexed="true" stored="true"/>
     <field name="name" type="string" indexed="true" stored="true"/>
     <field name="duration" type="string" indexed="true" stored="true"/>
     <field name="fee" type="double" indexed="true" stored="true"/>


请提供您正在执行的步骤的详细信息。如果调用了/dataimport服务,日志中应该有一些消息。如果没有,请检查日志级别并将其设置为调试DataImportHandler包,然后重试。如果无法让Solr记录某些内容,请参阅或。