# Update document's routing key

**URL:** <https://discuss.elastic.co/t/update-documents-routing-key/11840>\
**Category:** Elasticsearch\
**Created:** [May 6, 2013, 6:14pm UTC](https://discuss.elastic.co/t/update-documents-routing-key/11840 "2013-05-06T18:14:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Meson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomas_meson/32/2359_2.png) [@Thomas\_Meson](https://discuss.elastic.co/u/Thomas_Meson)\
**Post date:** [May 6, 2013, 6:14pm UTC](https://discuss.elastic.co/t/update-documents-routing-key/11840/1 "2013-05-06T18:14:57Z")

</div>

Hi,

I want to know if it's actually possible to update the routing key of a  
document?  
I've try the \_update method, without providing the routing parameter, with  
the routing set to the old routing key, with the routing set to the new  
routing key.  
I've also try to re-index the document, again without the routing  
parameter, with routing set to old/new routing key.  
Nothing works, it keep throwing: MapperParsingException[External routing  
[b62e540c7db319bcbeb9acbb3cbf9854] and document path routing  
[delete\_b62e540c7db319bcbeb9acbb3cbf9854] mismatch].

Any idea?  
From what I see, it does not really seems to be possible to update the  
routing key of a document.

Another question also: Can the routing key be an empty string?  
(the document represents a user of my API, the routing key is the API key,  
and when "deleting" the user, I was simply setting its API key to an empty  
string.)

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:38am UTC](https://discuss.elastic.co/t/update-documents-routing-key/11840/2 "2017-07-06T02:38:04Z")

</div>


