Reputation: 1
I'm new to Solr. I want to ask a question, I don't know why does my solr delta-import doesn't work. I think that I have configured my core solr config, schema, and data-config properly.
Full-import works well but delta-import doesn't.
I guess that my Solr doesn't read "last_index_time properly" on dataimport.properties because in my dataimport.properties file there's no "dataimport.last_index_time".
This is my solr core configuration:
solrconfig.xml
<!-- DIH -->
<!--<lib dir="../../../contrib/dataimporthandler/lib/" regex=".*\.jar" />-->
<lib dir="${solr.install.dir:../../..}/dist/" regex="solr-dataimporthandler-\d.*\.jar" />
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">db-data-config.xml</str>
</lst>
</requestHandler>
<!-- -->
schema.xml
<!-- DIH -->
<!--<dynamicField name="*_name" type="text_general" multiValued="false" indexed="true" stored="true" />-->
<!--<dynamicField name="c_*" type="text_general" multiValued="false" indexed="true" stored="true" />-->
<field name="judul" type="text_general" indexed="true" stored="true" multiValued="false" />
<field name="isi" type="text_general" indexed="true" stored="true" multiValued="false" />
<field name="tgl_publikasi" type="date" indexed="true" stored="true" multiValued="false" />
<field name="id_sort" type="int" indexed="true" stored="true" multiValued="false" />
<copyField source="id" dest="id_sort" />
<uniqueKey>id</uniqueKey>
db-data-config.xml
<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/medmon_skripsi"
user="root"
password="" />
<document>
<entity name="berita" pk="id" query="select id, c_title, c_isi, c_pubdate from t_berita" deltaImportQuery="select id, c_title, c_isi, c_pubdate from t_berita where id='$(dih.delta.id)'" deltaQuery="select id from t_berita where c_last_modified > '$(dih.last_index_time)'">
<field name="judul" column="c_title" />
<field name="isi" column="c_isi" />
<field name="tgl_publikasi" column="c_pubdate" />
</entity>
</document>
</dataConfig>
dataimport.properties
#Sun May 03 14:47:26 ICT 2015
last_index_time=2015-05-03 14\:47\:06
berita.last_index_time=2015-05-03 14\:47\:06
I try to see delta-import work by add one record to MySQL RDBMS, but I didn't see my delta-import work. (index not updated)
FYI I used Solr 4.10.3 with Tomcat 8.0.20
Upvotes: 0
Views: 254