Modifying an existing entry without source

Is it possible to (through the JAVA API) modify an existing entry when the
original source is not available? I imagine the process to be that you'll
have to retrieve the entry in some form, modify the relevant fields, and
then resubmit the entry where only the modified fields will be updated.
Something like that...

I am, of course, able to do this when the original source is saved, because
then I can perfectly reconstruct the index entry as if it is a new one from
the data obtained from the Get method.

Thanks you...

Thinus

I am afraid it's not possible at the moment. Elasticsearch is using Lucene
as an underlying search engine and, unfortunately, there is no update
operation in Lucene. All updates are basically deletes followed by adds. In
other words, elasticsearch needs to have access to a complete record in
order to update it. In theory, elasticsearch could reconstruct source if
all fields were stored, but it doesn't support that at the moment.

Igor

On Monday, March 12, 2012 8:24:05 AM UTC-4, Thinus Prinsloo wrote:

Is it possible to (through the JAVA API) modify an existing entry when the
original source is not available? I imagine the process to be that you'll
have to retrieve the entry in some form, modify the relevant fields, and
then resubmit the entry where only the modified fields will be updated.
Something like that...

I am, of course, able to do this when the original source is saved,
because then I can perfectly reconstruct the index entry as if it is a new
one from the data obtained from the Get method.

Thanks you...

Thinus

Igor is correct about underlying storage, however there's workaround in
0.19.0.
You can check it here

Alexandr Vasilenko

2012/3/12 Igor Motov imotov@gmail.com

I am afraid it's not possible at the moment. Elasticsearch is using Lucene
as an underlying search engine and, unfortunately, there is no update
operation in Lucene. All updates are basically deletes followed by adds. In
other words, elasticsearch needs to have access to a complete record in
order to update it. In theory, elasticsearch could reconstruct source if
all fields were stored, but it doesn't support that at the moment.

Igor

On Monday, March 12, 2012 8:24:05 AM UTC-4, Thinus Prinsloo wrote:

Is it possible to (through the JAVA API) modify an existing entry when
the original source is not available? I imagine the process to be that
you'll have to retrieve the entry in some form, modify the relevant fields,
and then resubmit the entry where only the modified fields will be updated.
Something like that...

I am, of course, able to do this when the original source is saved,
because then I can perfectly reconstruct the index entry as if it is a new
one from the data obtained from the Get method.

Thanks you...

Thinus

On Mon, 2012-03-12 at 15:14 +0200, Alex Vasilenko wrote:

Igor is correct about underlying storage, however there's workaround
in 0.19.0.
You can check it
here Elasticsearch Platform — Find real-time answers at scale | Elastic

This only works if the source field is enabled, and from the OP, it
sounds like it isn't

clint

Alexandr Vasilenko

2012/3/12 Igor Motov imotov@gmail.com
I am afraid it's not possible at the moment. Elasticsearch is
using Lucene as an underlying search engine and,
unfortunately, there is no update operation in Lucene. All
updates are basically deletes followed by adds. In other
words, elasticsearch needs to have access to a complete record
in order to update it. In theory, elasticsearch could
reconstruct source if all fields were stored, but it doesn't
support that at the moment.

    Igor
    
    On Monday, March 12, 2012 8:24:05 AM UTC-4, Thinus Prinsloo
    wrote:
            Is it possible to (through the JAVA API) modify an
            existing entry when the original source is not
            available?  I imagine the process to be that you'll
            have to retrieve the entry in some form, modify the
            relevant fields, and then resubmit the entry where
            only the modified fields will be updated.  Something
            like that...
            
            
            I am, of course, able to do this when the original
            source is saved, because then I can perfectly
            reconstruct the index entry as if it is a new one from
            the data obtained from the Get method.
            
            
            Thanks you...
            
            
            Thinus