Im using solr 4.4 ,my config.xml file is as given below.
First time i do a full import of 40000 rows ,it is indexed.
Now in my application i add one more row the total count comes to 40001,i need
to do the full import or delta import?
I know that the delta import is applied to a row which is indexed ,
What is the approach when a new row is added to mysql ,do we need to use full
import of all 40001 data ?
<dataConfig>
<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mydb" user="uname" password="pwd" batchSize="1" />
<document name="resource">
<entity name="resource" query="SELECT * FROM resource"
deltaImportQuery="SELECT * FROM resource WHERE ref = '${dataimporter.delta.ref}'"
deltaQuery="SELECT * FROM resource WHERE last_modified > '${dataimporter.last_index_time}'" transformer="RegexTransformer">
<field column="ref" name="ref"/>
<field column="name" name="name"/>
................
............
</entity>
</document>
</dataConfig>
Here is a good article right from the documentation , that talks about a delta import via full import approach with being efficient . Have a look at it here https://wiki.apache.org/solr/DataImportHandlerDeltaQueryViaFullImport . Hope this helps :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.