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 Andreas Niekler <an...@informatik.uni-leipzig.de> on 2012/11/08 11:40:27 UTC

Re-index stored values

Hello,

how could i re-index stored values of my solr index if i change the 
schema. Is there a gentle way to do this with stored values within solr 
itself? Normally i have to grab the stored values of a field and put it 
again to an update query for solr.

What does that to to copied fields? Can i just delete the contents of a 
copied field a well?

Thank you for any proposals

Andreas
-- 
Andreas Niekler, Dipl. Ing. (FH)
NLP Group | Department of Computer Science
University of Leipzig
Johannisgasse 26 | 04103 Leipzig

mail: aniekler@informatik.uni-leipzig.deg.de

Re: Re-index stored values

Posted by Gora Mohanty <go...@mimirtech.com>.
On 8 November 2012 20:31, Andreas Niekler <
aniekler@informatik.uni-leipzig.de> wrote:

> Thank you for your answer. If you talk of various ways can you also
> comment on some other aproaches?
>

I am not that familiar with SolrJ, but I think that it should
also be possible to use it to read the stored values, and
re-index them to a different index. Similarly, you should
be able to use most any programming language to retrieve
values by querying the Solr query URL, and then re-index.
In most cases, that is probably most easily done via
generating Solr XML.

Maybe someone else can suggest a better way to do this.

Regards,
Gora

Re: Re-index stored values

Posted by Andreas Niekler <an...@informatik.uni-leipzig.de>.
Thank you for your answer. If you talk of various ways can you also 
comment on some other aproaches?

Am 08.11.2012 15:37, schrieb Gora Mohanty:
> On 8 November 2012 16:10, Andreas Niekler
> <an...@informatik.uni-leipzig.de> wrote:
>>
>> Hello,
>>
>> how could i re-index stored values of my solr index if i change the
>> schema. Is there a gentle way to do this with stored values within solr
>> itself? Normally i have to grab the stored values of a field and put it
>> again to an update query for solr.
>>
>> What does that to to copied fields? Can i just delete the contents of a
>> copied field a well?
>
> There are various ways one could do this, but one way is to retrieve
> the values, put it into Solr XML format, and post the XML to a *new*
> Solr index with the new schema. Do not retrieve the copy fields, and
> the re-indexing should recopy these as per directives in the new schema.xml.
>
> Regards,
> Gora
>

-- 
Andreas Niekler, Dipl. Ing. (FH)
NLP Group | Department of Computer Science
University of Leipzig
Johannisgasse 26 | 04103 Leipzig

mail: aniekler@informatik.uni-leipzig.deg.de

Re: Re-index stored values

Posted by Gora Mohanty <go...@mimirtech.com>.
On 8 November 2012 16:10, Andreas Niekler
<an...@informatik.uni-leipzig.de> wrote:
>
> Hello,
>
> how could i re-index stored values of my solr index if i change the
> schema. Is there a gentle way to do this with stored values within solr
> itself? Normally i have to grab the stored values of a field and put it
> again to an update query for solr.
>
> What does that to to copied fields? Can i just delete the contents of a
> copied field a well?

There are various ways one could do this, but one way is to retrieve
the values, put it into Solr XML format, and post the XML to a *new*
Solr index with the new schema. Do not retrieve the copy fields, and
the re-indexing should recopy these as per directives in the new schema.xml.

Regards,
Gora