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 ph...@free.fr on 2014/11/06 17:20:32 UTC

Updating an index

Hello,

I have [mistakenly] created a SOLR index in which the document IDs contain URIs such as file:///Z:/1933/01/1933_01.png .

In a single SOLR update command, how can I:

- copy the contents of each document's id field to a new field called 'url', after replacing 'Z:' by 'Y:'

- make SOLR generate a new random Id for each document

Many thanks.

Philippe



Re: Updating an index

Posted by andrey prokopenko <an...@gmail.com>.
I echo that. Atomic update is merely a decoration over the same
delete/insert pattern, where Solr processor inplace retrieves all the
stored fields of the the document, updates the field, then checks _version_
field prior to update and if it was correct, deletes, then insert new
version of the document.


On Thu, Nov 6, 2014 at 8:06 PM, Erick Erickson <er...@gmail.com>
wrote:

> No way that I know of, re-indexing is in order.
>
> Solr does not "update in place", you have to re-add the document. Well,
> AtomicUpdates work but iff all fields are stored. And it still wouldn't
> be a single Solr command.
>
> Best,
> Erick
>
> On Thu, Nov 6, 2014 at 8:20 AM,  <ph...@free.fr> wrote:
> > Hello,
> >
> > I have [mistakenly] created a SOLR index in which the document IDs
> contain URIs such as file:///Z:/1933/01/1933_01.png .
> >
> > In a single SOLR update command, how can I:
> >
> > - copy the contents of each document's id field to a new field called
> 'url', after replacing 'Z:' by 'Y:'
> >
> > - make SOLR generate a new random Id for each document
> >
> > Many thanks.
> >
> > Philippe
> >
> >
>

Re: Updating an index

Posted by Erick Erickson <er...@gmail.com>.
No way that I know of, re-indexing is in order.

Solr does not "update in place", you have to re-add the document. Well,
AtomicUpdates work but iff all fields are stored. And it still wouldn't
be a single Solr command.

Best,
Erick

On Thu, Nov 6, 2014 at 8:20 AM,  <ph...@free.fr> wrote:
> Hello,
>
> I have [mistakenly] created a SOLR index in which the document IDs contain URIs such as file:///Z:/1933/01/1933_01.png .
>
> In a single SOLR update command, how can I:
>
> - copy the contents of each document's id field to a new field called 'url', after replacing 'Z:' by 'Y:'
>
> - make SOLR generate a new random Id for each document
>
> Many thanks.
>
> Philippe
>
>