Just a note before answering, the change is about the document you send to 
elasticsearch. Instead of sending:

{
  "file": {
    "content": 
"VGhpcyBpcyBhbiBlbGFzdGljc2VhcmNoIG1hcHBlciBhdHRhY2htZW50IHRlc3Qu",
    "_name": "myfilename.txt"
  }
}

You now send

{
  "file": {
    "_content": 
"VGhpcyBpcyBhbiBlbGFzdGljc2VhcmNoIG1hcHBlciBhdHRhY2htZW50IHRlc3Qu",
    "_name": "myfilename.txt"
  }
}

It’s not related to generated field names at index time.


That said, I think you should better handle that on client side unless you have 
a few docs to reindex.
That answers to your question, yes you have to reindex if you want to use the 
new format instead of the old one.
Though you can try to work around with script fields: 
http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-script-fields.html
 
<http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-script-fields.html>


Does it help?

-- 
David Pilato - Developer | Evangelist 
elastic.co
@dadoonet <https://twitter.com/dadoonet> | @elasticsearchfr 
<https://twitter.com/elasticsearchfr> | @scrutmydocs 
<https://twitter.com/scrutmydocs>





> Le 30 avr. 2015 à 12:12, Prashant Agrawal <prashant.agra...@paladion.net> a 
> écrit :
> 
> Hi dadoonet,
> 
> Currently we were using Elasticsearch 1.3.0 and supported Mapper Plugin for
> the same. Now we are moving Elasticsearch 1.5.2 so we need to have the
> updated mapper att plugin as well.
> 
> As in the latest one content is deprecated by _content, so in our
> application we need to change the content to _content while retrieving the
> document. So here my question is like is there way to re index the
> Elasticsearch data so that older records can also be returned using _content
> instead of content (any way like changing some conf or doing re indexing or
> something else)
> 
> 
> 
> --
> View this message in context: 
> http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Mapper-Attachment-plugin-2-3-0-released-tp4060656p4074364.html
> Sent from the Elasticsearch Users mailing list archive at Nabble.com.
> 
> -- 
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/1430388737162-4074364.post%40n3.nabble.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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/2E348C66-DC16-421C-B905-5F6BA3C74332%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to