我正在使用Solr 6
我没有从SOLR日志中收到任何错误..也许我在从SOLR UI查询时无法获得完整的数据。 我只收到[SOLR回复] [1]
solrconfig.xml
<requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">solr-data-config.xml</str>
</lst>
</requestHandler>
这是我的配置文件solr-data-config.xml
<dataConfig>
<dataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/xxxxxx_schema" user="root" password="xxxxxx" />
<document>
<entity name="implas" query="select
UID,
IMP_DEVICE_ID,
IMP_DEVICE_ISSUE_AGY,
IMP_BRAND_NAME,
IMP_COMPANY_NAME,
IMP_VERSION_MDL_NUM,
IMP_MRI_SAFETY_STATUS,
IMP_GMDN_TERMS,
IMP_LABEL_CONT_NRL,
IMP_CREATED_USER,
IMP_CREATED_TS,
IMP_UPDATED_USER,
IMP_UPDATED_TS from xxxxxxx_master">
<field column="UID" name="id" />
<field column="imp_device_id" name="impdevice" />
<field column="imp_device_issue_agy" name="impissue" />
<field column="imp_brand_name" name="impbrand" />
<field column="IMP_COMPANY_NAME" name="impcompany" />
<field column="IMP_VERSION_MDL_NUM" name="impversion" />
<field column="IMP_MRI_SAFETY_STATUS" name="impmri" />
<field column="IMP_GMDN_TERMS" name="impgdn" />
<field column="IMP_LABEL_CONT_NRL" name="implable" />
<field column="IMP_CREATED_USER" name="impcreated" />
<field column="IMP_CREATED_TS" name="impts" />
<field column="IMP_UPDATED_USER" name="impupdated" />
</entity>
</document>
</dataConfig>
Response :
{
"responseHeader":{
"status":0,
"QTime":0,
"params":{
"q":"*:*",
"indent":"on",
"wt":"json",
"_":"1495186229665"}},
"response":{"numFound":12000,"start":0,"docs":[
{
"id":"1",
"_version_":1567804808791851008},
{
"id":"2",
"_version_":1567804808792899584},
{
"id":"3",
"_version_":1567804808793948160},
{
"id":"4",
"_version_":1567804808793948161},
{
"id":"5",
"_version_":1567804808794996736},
{
"id":"6",
"_version_":1567804808794996737},
{
"id":"7",
"_version_":1567804808794996738},
{
"id":"8",
"_version_":1567804808796045312},
{
"id":"9",
"_version_":1567804808796045313},