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 Rui Pereira <ru...@gmail.com> on 2009/03/06 18:42:34 UTC

Re: Add jdbc entity to DataImportHandler in runtime

Hi again,Isn't 'preImportDeleteQuery' a Solr 1.4 feature? I'm unable to
import only the entities I want, all the index is deleted.

In all entities I have a field that is unique by entity ('alias') and I
configured the preImportQuery in all entities like this: alias: '<entity
name>'.

Thanks in advanced,
   Rui Pereira

On Fri, Feb 20, 2009 at 3:39 PM, Shalin Shekhar Mangar <
shalinmangar@gmail.com> wrote:

> On Fri, Feb 20, 2009 at 8:01 PM, Rui Pereira <ruipereira910@gmail.com
> >wrote:
>
> > Only one more question: doesn't full-import deletes all records before
> > execution, or in this case only deletes the entities passed in the url?
> >
>
> If no 'entity' parameter is specified, a full-import deletes all existing
> documents. But if a 'entity' is specified then the deleteQuery is not
> executed. There's no way for DataImportHandler to figure out which
> documents
> were generated by which entity.
>
> You can use the 'preImportDeleteQuery' attribute on an entity to specify a
> delete query which can delete the documents created by that entity.
>
>
> http://wiki.apache.org/solr/DataImportHandler#head-70d3fdda52de9ee4fdb54e1c6f84199f0e1caa76
>
> --
> Regards,
> Shalin Shekhar Mangar.
>

Re: Add jdbc entity to DataImportHandler in runtime

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Fri, Mar 6, 2009 at 11:12 PM, Rui Pereira <ru...@gmail.com>wrote:

> Hi again,Isn't 'preImportDeleteQuery' a Solr 1.4 feature? I'm unable to
> import only the entities I want, all the index is deleted.
>
> In all entities I have a field that is unique by entity ('alias') and I
> configured the preImportQuery in all entities like this: alias: '<entity
> name>'.
>

Right, I forgot to mention. preImportQuery and postImporQuery are 1.4
(trunk) features.

-- 
Regards,
Shalin Shekhar Mangar.