$ curl -XPUT 'http://localhost:9200/rss/feeds/_mapping' -d '{"feeds" :
{"properties" : {"_all" : {"type" : "string", "store" : "yes"}}}}'
Result : {"ok":true,"acknowledged":true} - (I am able to change the mapping
for the index rss of type feeds)
but If I want to change all of the indices and types at once and tried:
$ curl -XPUT 'http://localhost:9200/_all/_mapping' -d '{"_all" :
{"properties" : {"_all" : {"type" : "string", "store" : "yes"}}}}'
{"error":"ActionRequestValidationException[Validation Failed: 1: mapping
type is missing;]","status":500}
curl -XPUT 'http://localhost:9200/_all/_mapping' -d '{"TYPE??????" :
{"properties" : {"_all" : {"type" : "string", "store" : "yes"}}}}' so How to make this work ? What will be type ??
*The reson why I wanted to change the Mapping: *
I am Using NEST(.NET API)
I am able to index the objects pretty well, but now when I tried to
serialize the object using Json converter and index the string object(c#
code excutes fine but... I get the following error in ElasticSearch Server:)
*
Failed to excute [index { so n so..., Source so n so...]
org.elasticsearch.index.mapper.MapperParsingException: Malformed content,
must start with an object*
I'm not aware of a way to change all your index settings at once. But if
you want to apply a mapping to all your existing indices, you can use the
Cluster State API[0] to get a list of indices and loop through them to
apply your mapping.
If you want to apply the mapping to every new index, you can use index
templates[1] or config mappings[2].
I am able to index the objects pretty well, but now when I tried to
serialize the object using Json converter and index the string object(c#
code excutes fine but... I get the following error in Elasticsearch Server:)
*
Failed to excute [index { so n so..., Source so n so...]
org.elasticsearch.index.mapper.MapperParsingException: Malformed content,
must start with an object*
On Monday, October 15, 2012 12:04:45 PM UTC+1, Radu Gheorghe wrote:
Hi,
I'm not aware of a way to change all your index settings at once. But if
you want to apply a mapping to all your existing indices, you can use the
Cluster State API[0] to get a list of indices and loop through them to
apply your mapping.
If you want to apply the mapping to every new index, you can use index
templates[1] or config mappings[2].
I am able to index the objects pretty well, but now when I tried to
serialize the object using Json converter and index the string object(c#
code excutes fine but... I get the following error in Elasticsearch Server:)
*
Failed to excute [index { so n so..., Source so n so...]
org.elasticsearch.index.mapper.MapperParsingException: Malformed
content, must start with an object*
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.