On 21 February 2013 14:27, cveres <csabave...@me.com> wrote:
> I am adding documents with data import handler from a mysql database. I
> create a unique id for each document by concatenating a couple of fields in
> the database. Every id is unique.
>
> After the import, over half the documents which were imported are deleted
> again, leaving me with less then half the documents in the database ending
> up in the Solr index.
[...]

By default, DIH cleans the index at the beginning, which means
that any older records that are no longer in the mysql database
will disappear from the Solr index. If you do not want that, set
clean=false as an attribute in the URL of the DIH full-import. This
will leave old records in the Solr index, update any records with
matching IDs, and add any new records with IDs that are not in
the Solr index. Please see http://wiki.apache.org/solr/DataImportHandler

Regards,
Gora

Reply via email to