如何解决无法使用 Oracle 数据库在 Apache Solr 中执行数据导入处理程序
我有一个要导入 Apache Solr 的 Oracle 数据库。在 solrconfig.xml 中有以下代码;
</requestHandler>
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-8.4.1.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-8.4.1.-extras.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 为 ;
enter
<dataConfig>
<dataSource type="JdbcDataSource"
driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@host:port:serviceid"
user="username"
password="password"/>
<document>
<entity name="tablename"
pk="CUST_SYS_ID"
query="select REC_VERSION,CUST_SYS_ID,CUST_CODE,CUST_APPR_UID,CUST_APPR_DTM,CUST_APPR_STS,CUST_DFLT_broK_CODE,CUST_MAILING_ADDR,CUST_PARENT_CUST_CODE,CUST_LINK_CUST_CODE,CUST_MC_CODE,CUST_NAME,CUST_SHORT_NAME,CUST_CONS_CODE,CUST_ATTACHED_TO,CUST_DFLT_YN,CUST_CREDIT_CHK_YN,CUST_CREDIT_LIMIT,CUST_CREDIT_CASH,CUST_ANNUAL_INCOME,CUST_COMMERCIAL_YN,CUST_FRZ_FLAG,CUST_FRZ_PERMANENT_YN,CUST_FRZ_REASON,CUST_EFF_FM_DTM,CUST_EFF_TO_DTM,CUST_ISO_rating,CUST_RI_TYPE,CUST_INTER_OFFICE_YN,CUST_LOCAL_YN,CUST_TAX_ID,CUST_FirsT_NAME,CUST_MIDDLE_NAME,CUST_LAST_NAME,CUST_TITLE,CUST_SUFFIX,CUST_SSN_NO,CUST_PROFESSION,CUST_QUALIFICATION,CUST_dob,CUST_GENDER,CUST_MARITAL_STS,CUST_ALL_CURR_APPL_YN,CUST_TAX_STS,CUST_LOCATION,CUST_PIN_NUMBER,CUST_GRP_COMP_CODE,CUST_GROUP_CODE,CUST_PAN_NO,CUST_CREDIT_DAYS,CUST_PAsspORT_NO,CUST_ASSR_YN,CUST_CIVIL_ID,CUST_CIVIL_ID_TYPE,CUST_REF_NO,CUST_MARKETER_CODE,CUST_PF_NO,CUST_COMM_REG_NO,CUST_CORP_APPR_CUST_YN,CUST_JOB,CUST_NATIONALITY,CUST_OCC_TYPE,CUST_CHANNEL,CUST_SUB_CHANNEL,CUST_TAX_YN,CUST_EMAIL_YN,CUST_SMS_YN,CUST_VER_NO,CUST_RESIDENT_YN,CUST_OWN_AC_YN,CUST_OWN_CAR_YN,CUST_OWN_HOUSE_YN,CUST_OWN_REFRIGERATOR_YN,CUST_OWN_TWO_WHEELER_YN,CUST_OWN_WASHING_MC_YN,CUST_TRAVEL_AbroAD,CUST_PAsspORT_EXPIRY_DTM,CUST_CONTACT_TYPE,CUST_STS,CUST_LEAD_YN,CUST_OTH_PROD_YN,CUST_VIP_YN,CUST_EMP_YN,CUST_CAPACITY,CUST_CSI_YN,CUST_CSI_LAST_DTM,CUST_REMARKS,CUST_AUTO_REN_PROC_DAY,CUST_NON_REN_NOTICE_DAY,CUST_TIN,CUST_PREF_MODE_OF_PAY,CR_UID,CR_DTM,UPD_UID,UPD_DTM,WF_PROCESS_ID,CUST_LEAD_CODE,CUST_REG_EXP_DTM,CUST_CIVIL_ID_EXPIRY_DTM,CUST_PARENT_ACC,CUST_PARENT_ACC_ID,CUST_TYPE,CUST_CAPITAL,CUST_ELECTRONIC_NO,CUST_CR_NO,CUST_BUSE_NATURE,CUST_PLACE_OF_ISSUE,CUST_NO_OF_EMP,CUST_REVENUE,CUST_ADDL_NO,CUST_OWNER_ID,CUST_IQAMA_NO,CUST_HIjri,CUST_EDUCAT_LVL,CUST_WORK_PLACE,CUST_DFLT_CC_CODE,CUST_REG_FM_DTM,CUST_ADDL_TYPE,CUST_BUS_NAT,CUST_HIjri_DTM,CUST_THIRD_NAME,CUST_DB_CR_ACC_TYPE,CUST_SUB_LED_TYPE,CUST_COMP_TYPE,CUST_VIP_REMARKS,CUST_BLOOD_GROUP,CUST_DEBIT_DAYS,CUST_DEBIT_LIMIT,CUST_VAT_TYPE,CUST_HIjri_dob,CUST_PROSPECT_YN,CUST_PROSPECT_NO,CUST_PHONE_NO,CUST_MOBILE_NO,CUST_ALTR_MOBILE_NO,CUST_MAIL_ID,CUST_ALTR_MAIL_ID,CUST_AR_FULL_NAME,CUST_ISSUED_IN,CUST_COMP_CLASS,REC_TYPE,CUST_REG_TO_DTM,CUST_AGENCY_TYPE from PCOM_CUSTOMER"
deltaQuery="SELECT REC_VERSION,CUST_AGENCY_TYPE FROM PCOM_CUSTOMER WHERE UPD_DTM > '${dataimporter.last_index_time}'">
<field column="CUST_SYS_ID" type="strings" name="CUST_SYS_ID" indexed="true" stored="true" />
<field column="CUST_CODE" type="strings" name="CUST_CODE" indexed="true" stored="true" />
<field column="CUST_APPR_UID" type="strings" name="CUST_APPR_UID" indexed="true" stored="true" />
<field column="CUST_APPR_DTM" type="strings" name="CUST_APPR_DTM" indexed="true" stored="true" />
<field column="CUST_APPR_STS" type="strings" name="CUST_APPR_STS" indexed="true" stored="true" />
<field column="CUST_DFLT_broK_CODE" type="strings" name="CUST_DFLT_broK_CODE" indexed="true" stored="true" />
<field column="CUST_MAILING_ADDR" type="strings" name="CUST_MAILING_ADDR" indexed="true" stored="true" />
<field column="CUST_PARENT_CUST_CODE" type="strings" name="CUST_PARENT_CUST_CODE" indexed="true" stored="true" />
<field column="CUST_LINK_CUST_CODE" type="strings" name="CUST_LINK_CUST_CODE" indexed="true" stored="true" />
<field column="CUST_MC_CODE" type="strings" name="CUST_MC_CODE" indexed="true" stored="true" />
<field column="CUST_NAME" type="strings" name="CUST_NAME" indexed="true" stored="true" />
<field column="CUST_SHORT_NAME" type="strings" name="CUST_SHORT_NAME" indexed="true" stored="true" />
<field column="CUST_CONS_CODE" type="strings" name="CUST_CONS_CODE" indexed="true" stored="true" />
<field column="CUST_ATTACHED_TO" type="strings" name="CUST_ATTACHED_TO" indexed="true" stored="true" />
<field column="CUST_DFLT_YN" type="strings" name="CUST_DFLT_YN" indexed="true" stored="true" />
<field column="CUST_CREDIT_CHK_YN" type="strings" name="CUST_CREDIT_CHK_YN" indexed="true" stored="true" />
<field column="CUST_CREDIT_LIMIT" type="strings" name="CUST_CREDIT_LIMIT" indexed="true" stored="true" />
<field column="CUST_CREDIT_CASH" type="strings" name="CUST_CREDIT_CASH" indexed="true" stored="true" />
<field column="CUST_ANNUAL_INCOME" type="strings" name="CUST_ANNUAL_INCOME" indexed="true" stored="true" />
<field column="CUST_COMMERCIAL_YN" type="strings" name="CUST_COMMERCIAL_YN" indexed="true" stored="true" />
<field column="CUST_FRZ_FLAG" type="strings" name="CUST_FRZ_FLAG" indexed="true" stored="true" />
<field column="CUST_FRZ_PERMANENT_YN" type="strings" name="CUST_FRZ_PERMANENT_YN" indexed="true" stored="true" />
<field column="CUST_FRZ_REASON" type="strings" name="CUST_FRZ_REASON" indexed="true" stored="true" />
<field column="CUST_EFF_FM_DTM" type="strings" name="CUST_EFF_FM_DTM" indexed="true" stored="true" />
<field column="CUST_EFF_TO_DTM" type="strings" name="CUST_EFF_TO_DTM" indexed="true" stored="true" />
<field column="CUST_ISO_rating" type="strings" name="CUST_ISO_rating" indexed="true" stored="true" />
<field column="CUST_RI_TYPE" type="strings" name="CUST_RI_TYPE" indexed="true" stored="true" />
<field column="CUST_INTER_OFFICE_YN" type="strings" name="CUST_INTER_OFFICE_YN" indexed="true" stored="true" />
<field column="CUST_LOCAL_YN" type="strings" name="CUST_LOCAL_YN" indexed="true" stored="true" />
<field column="CUST_TAX_ID" type="strings" name="CUST_TAX_ID" indexed="true" stored="true" />
<field column="CUST_FirsT_NAME" type="strings" name="CUST_FirsT_NAME" indexed="true" stored="true" />
<field column="CUST_MIDDLE_NAME" type="strings" name="CUST_MIDDLE_NAME" indexed="true" stored="true" />
<field column="CUST_LAST_NAME" type="strings" name="CUST_LAST_NAME" indexed="true" stored="true" />
<field column="CUST_TITLE" type="strings" name="CUST_TITLE" indexed="true" stored="true" />
<field column="CUST_SUFFIX" type="strings" name="CUST_SUFFIX" indexed="true" stored="true" />
<field column="CUST_SSN_NO" type="strings" name="CUST_SSN_NO" indexed="true" stored="true" />
<field column="CUST_PROFESSION" type="strings" name="CUST_PROFESSION" indexed="true" stored="true" />
<field column="CUST_QUALIFICATION" type="strings" name="CUST_QUALIFICATION" indexed="true" stored="true" />
<field column="CUST_dob" type="strings" name="CUST_dob" indexed="true" stored="true" />
<field column="CUST_GENDER" type="strings" name="CUST_GENDER" indexed="true" stored="true" />
<field column="CUST_MARITAL_STS" type="strings" name="CUST_MARITAL_STS" indexed="true" stored="true" />
<field column="CUST_ALL_CURR_APPL_YN" type="strings" name="CUST_ALL_CURR_APPL_YN" indexed="true" stored="true" />
<field column="CUST_TAX_STS" type="strings" name="CUST_TAX_STS" indexed="true" stored="true" />
<field column="CUST_LOCATION" type="strings" name="CUST_LOCATION" indexed="true" stored="true" />
<field column="CUST_PIN_NUMBER" type="strings" name="CUST_PIN_NUMBER" indexed="true" stored="true" />
<field column="CUST_GRP_COMP_CODE" type="strings" name="CUST_GRP_COMP_CODE" indexed="true" stored="true" />
<field column="CUST_GROUP_CODE" type="strings" name="CUST_GROUP_CODE" indexed="true" stored="true" />
<field column="CUST_PAN_NO" type="strings" name="CUST_PAN_NO" indexed="true" stored="true" />
<field column="CUST_CREDIT_DAYS" type="strings" name="CUST_CREDIT_DAYS" indexed="true" stored="true" />
<field column="CUST_PAsspORT_NO" type="strings" name="CUST_PAsspORT_NO" indexed="true" stored="true" />
<field column="CUST_ASSR_YN" type="strings" name="CUST_ASSR_YN" indexed="true" stored="true" />
<field column="CUST_CIVIL_ID" type="strings" name="CUST_CIVIL_ID" indexed="true" stored="true" />
<field column="CUST_CIVIL_ID_TYPE" type="strings" name="CUST_CIVIL_ID_TYPE" indexed="true" stored="true" />
<field column="CUST_REF_NO" type="strings" name="CUST_REF_NO" indexed="true" stored="true" />
<field column="CUST_MARKETER_CODE" type="strings" name="CUST_MARKETER_CODE" indexed="true" stored="true" />
<field column="CUST_PF_NO" type="strings" name="CUST_PF_NO" indexed="true" stored="true" />
<field column="CUST_COMM_REG_NO" type="strings" name="CUST_COMM_REG_NO" indexed="true" stored="true" />
<field column="CUST_CORP_APPR_CUST_YN" type="strings" name="CUST_CORP_APPR_CUST_YN" indexed="true" stored="true" />
<field column="CUST_JOB" type="strings" name="CUST_JOB" indexed="true" stored="true" />
<field column="CUST_NATIONALITY" type="strings" name="CUST_NATIONALITY" indexed="true" stored="true" />
<field column="CUST_OCC_TYPE" type="strings" name="CUST_OCC_TYPE" indexed="true" stored="true" />
<field column="CUST_CHANNEL" type="strings" name="CUST_CHANNEL" indexed="true" stored="true" />
<field column="CUST_SUB_CHANNEL" type="strings" name="CUST_SUB_CHANNEL" indexed="true" stored="true" />
<field column="CUST_TAX_YN" type="strings" name="CUST_TAX_YN" indexed="true" stored="true" />
<field column="CUST_EMAIL_YN" type="strings" name="CUST_EMAIL_YN" indexed="true" stored="true" />
<field column="CUST_SMS_YN" type="strings" name="CUST_SMS_YN" indexed="true" stored="true" />
<field column="CUST_VER_NO" type="strings" name="CUST_VER_NO" indexed="true" stored="true" />
<field column="CUST_RESIDENT_YN" type="strings" name="CUST_RESIDENT_YN" indexed="true" stored="true" />
<field column="CUST_OWN_AC_YN" type="strings" name="CUST_OWN_AC_YN" indexed="true" stored="true" />
<field column="CUST_OWN_CAR_YN" type="strings" name="CUST_OWN_CAR_YN" indexed="true" stored="true" />
<field column="CUST_OWN_HOUSE_YN" type="strings" name="CUST_OWN_HOUSE_YN" indexed="true" stored="true" />
<field column="CUST_OWN_REFRIGERATOR_YN" type="strings" name="CUST_OWN_REFRIGERATOR_YN" indexed="true" stored="true" />
<field column="CUST_OWN_TWO_WHEELER_YN" type="strings" name="CUST_OWN_TWO_WHEELER_YN" indexed="true" stored="true" />
<field column="CUST_OWN_WASHING_MC_YN" type="strings" name="CUST_OWN_WASHING_MC_YN" indexed="true" stored="true" />
<field column="CUST_TRAVEL_AbroAD" type="strings" name="CUST_TRAVEL_AbroAD" indexed="true" stored="true" />
<field column="CUST_PAsspORT_EXPIRY_DTM" type="strings" name="CUST_PAsspORT_EXPIRY_DTM" indexed="true" stored="true" />
<field column="CUST_CONTACT_TYPE" type="strings" name="CUST_CONTACT_TYPE" indexed="true" stored="true" />
<field column="CUST_STS" type="strings" name="CUST_STS" indexed="true" stored="true" />
<field column="CUST_LEAD_YN" type="strings" name="CUST_LEAD_YN" indexed="true" stored="true" />
<field column="CUST_OTH_PROD_YN" type="strings" name="CUST_OTH_PROD_YN" indexed="true" stored="true" />
<field column="CUST_VIP_YN" type="strings" name="CUST_VIP_YN" indexed="true" stored="true" />
<field column="CUST_EMP_YN" type="strings" name="CUST_EMP_YN" indexed="true" stored="true" />
<field column="CUST_CAPACITY" type="strings" name="CUST_CAPACITY" indexed="true" stored="true" />
<field column="CUST_CSI_YN" type="strings" name="CUST_CSI_YN" indexed="true" stored="true" />
<field column="CUST_CSI_LAST_DTM" type="strings" name="CUST_CSI_LAST_DTM" indexed="true" stored="true" />
<field column="CUST_REMARKS" type="strings" name="CUST_REMARKS" indexed="true" stored="true" />
<field column="CUST_AUTO_REN_PROC_DAY" type="strings" name="CUST_AUTO_REN_PROC_DAY" indexed="true" stored="true" />
<field column="CUST_NON_REN_NOTICE_DAY" type="strings" name="CUST_NON_REN_NOTICE_DAY" indexed="true" stored="true" />
<field column="CUST_TIN" type="strings" name="CUST_TIN" indexed="true" stored="true" />
<field column="CUST_PREF_MODE_OF_PAY" type="strings" name="CUST_PREF_MODE_OF_PAY" indexed="true" stored="true" />
<field column="CR_UID" type="strings" name="CR_UID" indexed="true" stored="true" />
<field column="CR_DTM" type="strings" name="CR_DTM" indexed="true" stored="true" />
<field column="UPD_UID" type="strings" name="UPD_UID" indexed="true" stored="true" />
<field column="UPD_DTM" type="strings" name="UPD_DTM" indexed="true" stored="true" />
<field column="WF_PROCESS_ID" type="strings" name="WF_PROCESS_ID" indexed="true" stored="true" />
<field column="CUST_LEAD_CODE" type="strings" name="CUST_LEAD_CODE" indexed="true" stored="true" />
<field column="CUST_REG_EXP_DTM" type="strings" name="CUST_REG_EXP_DTM" indexed="true" stored="true" />
<field column="CUST_CIVIL_ID_EXPIRY_DTM" type="strings" name="CUST_CIVIL_ID_EXPIRY_DTM" indexed="true" stored="true" />
<field column="CUST_PARENT_ACC" type="strings" name="CUST_PARENT_ACC" indexed="true" stored="true" />
<field column="CUST_PARENT_ACC_ID" type="strings" name="CUST_PARENT_ACC_ID" indexed="true" stored="true" />
<field column="CUST_TYPE" type="strings" name="CUST_TYPE" indexed="true" stored="true" />
<field column="CUST_CAPITAL" type="strings" name="CUST_CAPITAL" indexed="true" stored="true" />
<field column="CUST_ELECTRONIC_NO" type="strings" name="CUST_ELECTRONIC_NO" indexed="true" stored="true" />
<field column="CUST_CR_NO" type="strings" name="CUST_CR_NO" indexed="true" stored="true" />
<field column="CUST_BUSE_NATURE" type="strings" name="CUST_BUSE_NATURE" indexed="true" stored="true" />
<field column="CUST_PLACE_OF_ISSUE" type="strings" name="CUST_PLACE_OF_ISSUE" indexed="true" stored="true" />
<field column="CUST_NO_OF_EMP" type="strings" name="CUST_NO_OF_EMP" indexed="true" stored="true" />
<field column="CUST_REVENUE" type="strings" name="CUST_REVENUE" indexed="true" stored="true" />
<field column="CUST_ADDL_NO" type="strings" name="CUST_ADDL_NO" indexed="true" stored="true" />
<field column="CUST_OWNER_ID" type="strings" name="CUST_OWNER_ID" indexed="true" stored="true" />
<field column="CUST_IQAMA_NO" type="strings" name="CUST_IQAMA_NO" indexed="true" stored="true" />
<field column="CUST_HIjri" type="strings" name="CUST_HIjri" indexed="true" stored="true" />
<field column="CUST_EDUCAT_LVL" type="strings" name="CUST_EDUCAT_LVL" indexed="true" stored="true" />
<field column="CUST_WORK_PLACE" type="strings" name="CUST_WORK_PLACE" indexed="true" stored="true" />
<field column="CUST_DFLT_CC_CODE" type="strings" name="CUST_DFLT_CC_CODE" indexed="true" stored="true" />
<field column="CUST_REG_FM_DTM" type="strings" name="CUST_REG_FM_DTM" indexed="true" stored="true" />
<field column="CUST_ADDL_TYPE" type="strings" name="CUST_ADDL_TYPE" indexed="true" stored="true" />
<field column="CUST_BUS_NAT" type="strings" name="CUST_BUS_NAT" indexed="true" stored="true" />
<field column="CUST_HIjri_DTM" type="strings" name="CUST_HIjri_DTM" indexed="true" stored="true" />
<field column="CUST_THIRD_NAME" type="strings" name="CUST_THIRD_NAME" indexed="true" stored="true" />
<field column="CUST_DB_CR_ACC_TYPE" type="strings" name="CUST_DB_CR_ACC_TYPE" indexed="true" stored="true" />
<field column="CUST_SUB_LED_TYPE" type="strings" name="CUST_SUB_LED_TYPE" indexed="true" stored="true" />
<field column="CUST_COMP_TYPE" type="strings" name="CUST_COMP_TYPE" indexed="true" stored="true" />
<field column="CUST_VIP_REMARKS" type="strings" name="CUST_VIP_REMARKS" indexed="true" stored="true" />
<field column="CUST_BLOOD_GROUP" type="strings" name="CUST_BLOOD_GROUP" indexed="true" stored="true" />
<field column="CUST_DEBIT_DAYS" type="strings" name="CUST_DEBIT_DAYS" indexed="true" stored="true" />
<field column="CUST_DEBIT_LIMIT" type="strings" name="CUST_DEBIT_LIMIT" indexed="true" stored="true" />
<field column="CUST_VAT_TYPE" type="strings" name="CUST_VAT_TYPE" indexed="true" stored="true" />
<field column="CUST_HIjri_dob" type="strings" name="CUST_HIjri_dob" indexed="true" stored="true" />
<field column="CUST_PROSPECT_YN" type="strings" name="CUST_PROSPECT_YN" indexed="true" stored="true" />
<field column="CUST_PROSPECT_NO" type="strings" name="CUST_PROSPECT_NO" indexed="true" stored="true" />
<field column="CUST_PHONE_NO" type="strings" name="CUST_PHONE_NO" indexed="true" stored="true" />
<field column="CUST_MOBILE_NO" type="strings" name="CUST_MOBILE_NO" indexed="true" stored="true" />
<field column="CUST_ALTR_MOBILE_NO" type="strings" name="CUST_ALTR_MOBILE_NO" indexed="true" stored="true" />
<field column="CUST_MAIL_ID" type="strings" name="CUST_MAIL_ID" indexed="true" stored="true" />
<field column="CUST_ALTR_MAIL_ID" type="strings" name="CUST_ALTR_MAIL_ID" indexed="true" stored="true" />
<field column="CUST_AR_FULL_NAME" type="strings" name="CUST_AR_FULL_NAME" indexed="true" stored="true" />
<field column="CUST_ISSUED_IN" type="strings" name="CUST_ISSUED_IN" indexed="true" stored="true" />
<field column="CUST_COMP_CLASS" type="strings" name="CUST_COMP_CLASS" indexed="true" stored="true" />
<field column="REC_TYPE" type="strings" name="REC_TYPE" indexed="true" stored="true" />
<field column="CUST_REG_TO_DTM" type="strings" name="CUST_REG_TO_DTM" indexed="true" stored="true" />
<field column="CUST_AGENCY_TYPE" type="strings" name="CUST_AGENCY_TYPE" indexed="true" stored="true" />
</entity>
</document>
</dataConfig>
但数据导入处理程序 UI 小部件并未导入 Oracle DB 数据,它只是闪烁索引文本,但没有任何反应,我使用 Solr 8.4.1 进行上述操作。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。