I have an Oracle DB to be imported into Apache Solr . Have the below code in 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>
and the data-config.xml as ;
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_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 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" />
<f