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.
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.
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.
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
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.