Delete support


(Qin Zhang) #1

Hi,

I'm a new user of elastic search and like what I've seen so far. I have
some questions on versioning support:
It seems that each update creates a new version of the document. I'm
concerned about the index grow overtime since our app will have frequent
updates on some objects.

  1. Can I clean up the index by deleting old versions of a document?
  2. In some cases I actually don't want to create a new version when updating
    a document. Is there any API support for this in-place update?

Thanks,

-Qin Zhang
Model N.


(Kun Niu) #2

You can delete document using TransportClient or json request.

If you want to update a document, you can use the same id to update the
record.

Kun Niu

From: elasticsearch@googlegroups.com [mailto:elasticsearch@googlegroups.com]
On Behalf Of Qin Zhang
Sent: 2011年8月30日 2:54
To: elasticsearch@googlegroups.com
Subject: delete support

Hi,

I'm a new user of elastic search and like what I've seen so far. I have
some questions on versioning support:

It seems that each update creates a new version of the document. I'm
concerned about the index grow overtime since our app will have frequent
updates on some objects.

  1. Can I clean up the index by deleting old versions of a document?

  2. In some cases I actually don't want to create a new version when updating
    a document. Is there any API support for this in-place update?

Thanks,

-Qin Zhang

Model N.


(Shay Banon) #3

When you update a document, what effectively happens is that the document
gets reindexed again as if it was a new document, and the "old" document
gets marked as deleted. In the background, there is a merge process going
around that expunges deleted docs (among other things). (this is all Lucene,
btw). There isn't a way to do an "in place update", you can only "reindex" a
doc with updated values.

On Mon, Aug 29, 2011 at 9:53 PM, Qin Zhang qzhang@modeln.com wrote:

Hi,

I'm a new user of elastic search and like what I've seen so far. I have
some questions on versioning support:
It seems that each update creates a new version of the document. I'm
concerned about the index grow overtime since our app will have frequent
updates on some objects.

  1. Can I clean up the index by deleting old versions of a document?
  2. In some cases I actually don't want to create a new version when
    updating a document. Is there any API support for this in-place update?

Thanks,

-Qin Zhang
Model N.


(Qin Zhang) #4

Thank you. This is actually the behavior that I want, most of the times. I
was just confused about the versioning feature that was introduced recently.
Can you clarify further what kind of update creates a new version and keeps
both versions that can be queried? I read the
http://www.elasticsearch.org/guide/reference/api/index_.html and I thought
that that all updates create a new version and keep the old version, instead
of marking the "old" as deleted...

On Mon, Aug 29, 2011 at 12:05 PM, Shay Banon kimchy@gmail.com wrote:

When you update a document, what effectively happens is that the document
gets reindexed again as if it was a new document, and the "old" document
gets marked as deleted. In the background, there is a merge process going
around that expunges deleted docs (among other things). (this is all Lucene,
btw). There isn't a way to do an "in place update", you can only "reindex" a
doc with updated values.

On Mon, Aug 29, 2011 at 9:53 PM, Qin Zhang qzhang@modeln.com wrote:

Hi,

I'm a new user of elastic search and like what I've seen so far. I have
some questions on versioning support:
It seems that each update creates a new version of the document. I'm
concerned about the index grow overtime since our app will have frequent
updates on some objects.

  1. Can I clean up the index by deleting old versions of a document?
  2. In some cases I actually don't want to create a new version when
    updating a document. Is there any API support for this in-place update?

Thanks,

-Qin Zhang
Model N.

--

Qin Zhang | Senior Director, Product Development | Model N, Inc. | Direct:
650.610.4845| Fax: 650.610.4699 | qzhang@modeln.com | www.modeln.com

Model N: The Leader in Revenue Management


(Shay Banon) #5

Versioning does not mean keeping old versions around to be searchable. It
just means that documents now have a version associated with them.

On Tue, Aug 30, 2011 at 12:02 AM, Qin Zhang qzhang@modeln.com wrote:

Thank you. This is actually the behavior that I want, most of the times.
I was just confused about the versioning feature that was introduced
recently. Can you clarify further what kind of update creates a new version
and keeps both versions that can be queried? I read the
http://www.elasticsearch.org/guide/reference/api/index_.html and I thought
that that all updates create a new version and keep the old version, instead
of marking the "old" as deleted...

On Mon, Aug 29, 2011 at 12:05 PM, Shay Banon kimchy@gmail.com wrote:

When you update a document, what effectively happens is that the document
gets reindexed again as if it was a new document, and the "old" document
gets marked as deleted. In the background, there is a merge process going
around that expunges deleted docs (among other things). (this is all Lucene,
btw). There isn't a way to do an "in place update", you can only "reindex" a
doc with updated values.

On Mon, Aug 29, 2011 at 9:53 PM, Qin Zhang qzhang@modeln.com wrote:

Hi,

I'm a new user of elastic search and like what I've seen so far. I have
some questions on versioning support:
It seems that each update creates a new version of the document. I'm
concerned about the index grow overtime since our app will have frequent
updates on some objects.

  1. Can I clean up the index by deleting old versions of a document?
  2. In some cases I actually don't want to create a new version when
    updating a document. Is there any API support for this in-place update?

Thanks,

-Qin Zhang
Model N.

--

Qin Zhang | Senior Director, Product Development | Model N, Inc. |
Direct: 650.610.4845| Fax: 650.610.4699 | qzhang@modeln.com |
www.modeln.com

Model N: The Leader in Revenue Management


(system) #6