就我而言,索引已完成,但它没有通过文本搜索给出任何结果。它通过给出*:*
搜索词来显示一般索引数据。
solrconfig.xml:
`<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</requestHandler>`
架构.xml:
`<field name="su_id" type="string" indexed="true" stored="true" required="true"/>
<field name="su_url" type="string" indexed="true" stored="true"/>
<field name="su_path" type="string" indexed="true" stored="true"/>
<field name="su_actual_url" type="string" indexed="true" stored="true"/>
<uniqueKey>id</uniqueKey>
<defaultSearchField>su_path</defaultSearchField>`
数据配置.xml:
`<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/prod_astra"
user="root"
password="xyz"/>
<document name="content">
<entity name="products"
query="select * from search_links">
<field column="su_id" name="su_id" />
<field column="su_path" name="id"/>
<field column="su_url" name="su_url"/>
<field column="su_actual_url" name="su_actual_url" />
</entity>
</document>
`
任何帮助将不胜感激。