Update a field if _source is disabled


(ElasticSearch Users mailing list) #1

Hi,

I read it here
(http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html)
that the _source field needs to be enabled for Update API to work.

Does it mean that from Java or REST API, I cannot update any field defined
in the type mapping unless the _source is enabled?

Can I just use the stored:true on that field and update it? If so, can you
please show an example?

Thanks,
Sandeep

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4abea481-e8d4-4295-a450-45caecb2eaf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(David Pilato) #2

No you can't as behind the scene the full document is removed and inserted with new values (new version).

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 30 juil. 2014 à 08:52, "'Sandeep Ramesh Khanzode' via elasticsearch" elasticsearch@googlegroups.com a écrit :

Hi,

I read it here (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html) that the _source field needs to be enabled for Update API to work.

Does it mean that from Java or REST API, I cannot update any field defined in the type mapping unless the _source is enabled?

Can I just use the stored:true on that field and update it? If so, can you please show an example?

Thanks,
Sandeep

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4abea481-e8d4-4295-a450-45caecb2eaf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/13292F23-3013-4E5E-A0A5-981F6D5D45F4%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.


(system) #3