You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by PeriS <pe...@htcinc.com> on 2014/02/08 02:27:47 UTC
Index a new record in MySQL
Hi,
How do I approach the issue of firing the DIH without it having to index the whole DB when adding a new record? It appears that when a new record is added the delta query on DIH doesn’t pick up the record. And I don’t want to run a full index on the DB when adding 1 single row. Any suggestions please?
Thanks
-Peri
*** DISCLAIMER *** This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind HTC Global Services to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
Re: Index a new record in MySQL
Posted by "tamanjit.bindra@yahoo.co.in" <ta...@yahoo.co.in>.
The config seems ok. Have you checked the date in the properties file before
a delta-import? MySql does give issues with date format. Also, check your
webcontainer/solr logs; whether they give any exception when you call a
delta-import.
--
View this message in context: http://lucene.472066.n3.nabble.com/Index-a-new-record-in-MySQL-tp4116164p4116193.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Index a new record in MySQL
Posted by PeriS <pe...@htcinc.com>.
Hi,
Version of SOLR is 4.6 and here is my db-import-config.xml
<dataConfig>
<dataSource name="dbDS" type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
url="[fill me]"
user=“fill me" password=“fill me"/>
<document name=“example name">
<entity name=“table name" pk="id" transformer=com.example.sometransformer"
query="SELECT * from [table]"
deltaImportQuery="SELECT * from [table] where [pk]='${dataimporter.delta.pk}'"
deltaQuery="SELECT [pk] from [table] where last_modified > '${dataimporter.last_index_time}'">
<field column=“col" name=“col name"/>
<field column="last_modified" name="lastModified"/>
</entity>
</document>
</dataConfig>
On Feb 8, 2014, at 7:29 AM, tamanjit.bindra@yahoo.co.in wrote:
> But delta indexing is supposed to do that. Please share details of your
> datatimport-config.xml and version of Solr for further help.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Index-a-new-record-in-MySQL-tp4116164p4116184.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
>
>
*** DISCLAIMER *** This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind HTC Global Services to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
Re: Index a new record in MySQL
Posted by "tamanjit.bindra@yahoo.co.in" <ta...@yahoo.co.in>.
But delta indexing is supposed to do that. Please share details of your
datatimport-config.xml and version of Solr for further help.
--
View this message in context: http://lucene.472066.n3.nabble.com/Index-a-new-record-in-MySQL-tp4116164p4116184.html
Sent from the Solr - User mailing list archive at Nabble.com.