Update a field, not the entire document


(Jason Syf) #1

Hi,

Are there any plans to allow the update of a specific field in a
document, instead of indexing the entire document again? This would be
a common use case for my application, and updating the entire document
seem inefficient.

Thanks
Jason


(Lukáš Vlček) #2

Hi,

ES is built on top of Lucene and as long as Lucene can't do this then ES
can't provide it (efficiently) as well. You can either check the
parent/child feature [1-4] or consider redesigning your object mapping. May
be if you can share more about your use case then we could help to find some
solution.

[1] https://github.com/elasticsearch/elasticsearch/issues/553
[2]
http://www.elasticsearch.org/guide/reference/query-dsl/top-children-query.html
[3]
http://www.elasticsearch.org/guide/reference/query-dsl/has-child-query.html
[4]
http://www.elasticsearch.org/guide/reference/query-dsl/has-child-filter.html

Regards,
Lukas

On Thu, Mar 24, 2011 at 12:36 PM, Jason Syf jason.syf@gmail.com wrote:

Hi,

Are there any plans to allow the update of a specific field in a
document, instead of indexing the entire document again? This would be
a common use case for my application, and updating the entire document
seem inefficient.

Thanks
Jason


(danoyoung) #3

Jason,

This is one of the main reasons we decomposed our documents into
parent/children. Although we do have to rewrite the entire child (or parent)
document, it's better than rewriting a much larger JSON document.

Regards,

Dan

On Thu, Mar 24, 2011 at 6:23 AM, Lukáš Vlček lukas.vlcek@gmail.com wrote:

Hi,

ES is built on top of Lucene and as long as Lucene can't do this then ES
can't provide it (efficiently) as well. You can either check the
parent/child feature [1-4] or consider redesigning your object mapping. May
be if you can share more about your use case then we could help to find some
solution.

[1] https://github.com/elasticsearch/elasticsearch/issues/553
[2]
http://www.elasticsearch.org/guide/reference/query-dsl/top-children-query.html
[3]
http://www.elasticsearch.org/guide/reference/query-dsl/has-child-query.html
[4]
http://www.elasticsearch.org/guide/reference/query-dsl/has-child-filter.html

Regards,
Lukas

On Thu, Mar 24, 2011 at 12:36 PM, Jason Syf jason.syf@gmail.com wrote:

Hi,

Are there any plans to allow the update of a specific field in a
document, instead of indexing the entire document again? This would be
a common use case for my application, and updating the entire document
seem inefficient.

Thanks
Jason


(Shay Banon) #4

Heya,

Parent child do get some support at updating smaller documents, but, they do offer limited functionality (which might fit what you are after).

Yes, updating a single field in Lucene is not possible, and I don't think that Lucene should support that (personal opinion) as it will require too many changes internally and will most definitely affect performance.

That being said, there are cases where elasticsearch can implement updating specific type of fields in a doc outside of Lucene. This is still in the stage of idea floating around, but I do plan to try and tackle this in the near future, and see were it goes.

-shay.banon
On Thursday, March 24, 2011 at 3:35 PM, Dan Young wrote:

Jason,

This is one of the main reasons we decomposed our documents into parent/children. Although we do have to rewrite the entire child (or parent) document, it's better than rewriting a much larger JSON document.

Regards,

Dan

On Thu, Mar 24, 2011 at 6:23 AM, Lukáš Vlček lukas.vlcek@gmail.com wrote:

Hi,

ES is built on top of Lucene and as long as Lucene can't do this then ES can't provide it (efficiently) as well. You can either check the parent/child feature [1-4] or consider redesigning your object mapping. May be if you can share more about your use case then we could help to find some solution.

[1] https://github.com/elasticsearch/elasticsearch/issues/553
[2] http://www.elasticsearch.org/guide/reference/query-dsl/top-children-query.html
[3] http://www.elasticsearch.org/guide/reference/query-dsl/has-child-query.html
[4] http://www.elasticsearch.org/guide/reference/query-dsl/has-child-filter.html

Regards,
Lukas

On Thu, Mar 24, 2011 at 12:36 PM, Jason Syf jason.syf@gmail.com wrote:

Hi,

Are there any plans to allow the update of a specific field in a
document, instead of indexing the entire document again? This would be
a common use case for my application, and updating the entire document
seem inefficient.

Thanks
Jason


(system) #5