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 Luis Portela Afonso <me...@gmail.com> on 2013/09/05 21:33:11 UTC

Solr documents update on index

Hi,

I'm having a problem when solr indexes.
It is updating documents already indexed. Is this a normal behavior?
If a document with the same key already exists is it supposed to be updated?
I has thinking that is supposed to just update if the information on the
rss has changed.

Appreciate your help

-- 
Sent from Gmail Mobile

Re: Solr documents update on index

Posted by Luís Portela Afonso <me...@gmail.com>.
Hi,

But i'm indexing rss feeds. I want that solr indexes that without change the existing information of a document with the same uniqueKey.
The best approach is that solr updates the doc if changes are detected, but i can leave without that.

I really would like that solr does not update the document if it already exists.

I'm using the DataImportScheduler to solr index launch the scheduled index.

Appreciate any possible help.

On Sep 6, 2013, at 9:16 AM, Shalin Shekhar Mangar <sh...@gmail.com> wrote:

> Yes, if a document with the same key exists, then the old document
> will be deleted and replaced with the new document. You can also
> partially update documents (we call it atomic updates) which reads the
> old document from local index, updates it according to the request and
> then replaces the old document with the new one.
> 
> See https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Index+Handlers#UploadingDatawithIndexHandlers-UpdatingOnlyPartofaDocument
> 
> On Fri, Sep 6, 2013 at 1:03 AM, Luis Portela Afonso
> <me...@gmail.com> wrote:
>> Hi,
>> 
>> I'm having a problem when solr indexes.
>> It is updating documents already indexed. Is this a normal behavior?
>> If a document with the same key already exists is it supposed to be updated?
>> I has thinking that is supposed to just update if the information on the
>> rss has changed.
>> 
>> Appreciate your help
>> 
>> --
>> Sent from Gmail Mobile
> 
> 
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.


Re: Solr documents update on index

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Yes, if a document with the same key exists, then the old document
will be deleted and replaced with the new document. You can also
partially update documents (we call it atomic updates) which reads the
old document from local index, updates it according to the request and
then replaces the old document with the new one.

See https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Index+Handlers#UploadingDatawithIndexHandlers-UpdatingOnlyPartofaDocument

On Fri, Sep 6, 2013 at 1:03 AM, Luis Portela Afonso
<me...@gmail.com> wrote:
> Hi,
>
> I'm having a problem when solr indexes.
> It is updating documents already indexed. Is this a normal behavior?
> If a document with the same key already exists is it supposed to be updated?
> I has thinking that is supposed to just update if the information on the
> rss has changed.
>
> Appreciate your help
>
> --
> Sent from Gmail Mobile



-- 
Regards,
Shalin Shekhar Mangar.