I want to expand on this a bit - both copy_to and transform only modify the
indexed document, not the source document. The thinking is that you can
modify the source document yourself in the source application but the
source application can't modify the indexed document without modifying
the source document. Copy_to is useful for playing tricks like
concatenating multiple fields together so you only have to search on one of
them at a time rather than all of them.
For what it looks like you are doing I suggest using nested fields:
http://www.elastic.co/guide/en/elasticsearch/reference/1.3/_multi_fields.html
Nik
On Mon, Apr 13, 2015 at 11:23 AM, David Pilato david@pilato.fr wrote:
Nothing.
Elasticsearch does not modify _source field which contains the document
you sent.
It does create in the inverted index a new field. You can use it to query,
compute or retrieve if you stored it.
--
David Pilato - Developer | Evangelist
elastic.co http://elastic.co
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr
https://twitter.com/elasticsearchfr | @scrutmydocs
https://twitter.com/scrutmydocs
Le 13 avr. 2015 à 17:02, Michael Young michael.l.young@gmail.com a
écrit :
I'm having issues getting the "copy_to" functionality to work. It seems
pretty straight forward, so I wasn't expecting any problems.
Here is my index creation call:
curl -XPUT http://esnode:9200/test_index -d '{
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 1,
"index.mapping.ignore_malformed" : true
},
"mappings" : {
"default" : {
"properties": {
"name" : {
"type" : "string",
"copy_to" : "name_phonetic"
},
"name_phonetic" : {
"type" : "string"
}
}
}
}
}'
curl -XPUT http://esnode:9200/test_index/default/1 -d '{
"name" : "smith"
}'
When I query against test_index/default, I can see that "smith" is in the
"name" field. However the "name_phonetic" field is blank. What am I
missing?
Thank you!
--
Michael
--
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/0570abbe-f894-4822-b89a-3168f5f70687%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/0570abbe-f894-4822-b89a-3168f5f70687%40googlegroups.com?utm_medium=email&utm_source=footer
.
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/19DF140F-CB24-4C61-BE7A-8A7A88D0045D%40pilato.fr
https://groups.google.com/d/msgid/elasticsearch/19DF140F-CB24-4C61-BE7A-8A7A88D0045D%40pilato.fr?utm_medium=email&utm_source=footer
.
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/CAPmjWd2RiS0c4_yRZontn%2BsRgfj52GeYw8-cP7OC_LeYiDwiZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.