I answered myself a similar question here:

http://stackoverflow.com/questions/4037625/change-schema-in-solr-without-reindex

I Hope it helps

________________________________________
De: Marc SCHNEIDER [marc.schneide...@gmail.com]
Enviado el: lunes, 21 de marzo de 2011 15:20
Para: solr-user@lucene.apache.org
Asunto: Re: Transform a SolrDocument into a SolrInputDocument

Hi Péter,

I'm not sure to understand your answer. A SolrInputDocument always contains
only stored fields, so I don't see the problem.
I just like to update an existing stored field...

Thanks,
Marc.

2011/3/21 Péter Király <kirun...@gmail.com>

> Hi Marc,
>
> as far as I know the best way to do it is working from the original
> source, because it is possible, that not all fields are stores, and
> the original content of the not stored fields is not inside the Solr
> document.
>
> Péter
>
> 2011/3/21 Marc SCHNEIDER <marc.schneide...@gmail.com>:
> > Hello,
> >
> > I'd like to know the fastest way (code lines) to update a field of a
> > document.
> > So my idea was:
> > 1) Get a SolrDocument
> > 2) Add all fields of the SolrDocument to a new SolrInputDocument
> > 3) Update the field in SolrInputDocument
> > 4) Add SolrInputDocument to the server and commit it
> >
> > Is there a fastest way to do that? I mean transforming a SolrDocument
> into a
> > SolrInputDocument?
> >
> > Thanks in advance,
> > Regards,
> > Marc.
> >
>

Reply via email to