Es mapping problem

I copied and slightly modified the example from the official doc, but this
fails:

$ curl -XPUT 'http://localhost:9200/wk-beta-com/created_datetime/_mapping'
-d '{
"created_datetime" : {
"properties" : {
"created_datetime" : {"type" : "string"},
}
}
}'

Why this error?
{"error":"MapperParsingException[Failed to parse mapping definition];
nested: JsonParseException[Unexpected character ('}' (code 125)): was
expecting either valid name character (for unquoted name) or double-quote
(for quoted) to start field name\n at [Source: {\n "created_datetime"
: {\n "properties" : {\n "created_datetime" :
{"type" : "string"},\n }\n }\n}; line: 5, column: 10]];
","status":400}

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hello!

Try removing the comma character after "created_datetime" : {"type" : "string"},", so your command looks like this:

$ curl -XPUT 'http://localhost:9200/wk-beta-com/created_datetime/_mapping' -d '{

"created_datetime" : {

"properties" : {


 "created_datetime" : {"type" : "string"}


}

}

}'

--

Regards,

Rafał Kuć

Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

I copied and slightly modified the example from the official doc, but this fails:

$ curl -XPUT 'http://localhost:9200/wk-beta-com/created_datetime/_mapping' -d '{

"created_datetime" : {


    "properties" : {


        "created_datetime" : {"type" : "string"},


    }


}

}'

Why this error?

{"error":"MapperParsingException[Failed to parse mapping definition]; nested: JsonParseException[Unexpected character ('}' (code 125)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: {\n "created_datetime" : {\n "properties" : {\n "created_datetime" : {"type" : "string"},\n }\n }\n}; line: 5, column: 10]]; ","status":400}

--

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.

For more options, visit https://groups.google.com/groups/opt_out.

Thanks that was it.
Unfortunately I still don't see all the results that I should see..
If I got some errors previously because of malformed dates and I update the
mappings, should I immediately see the results which didn't come up before?

Or is it anything else?

On Thursday, February 7, 2013 2:46:44 PM UTC, Rafał Kuć wrote:

Hello!

Try removing the comma character after "created_datetime" : {"type" :
"string"},", so your command looks like this:

$ curl -XPUT 'http://localhost:9200/wk-beta-com/created_datetime/_mapping'
-d '{
"created_datetime" : {
"properties" : {
"created_datetime" : {"type" : "string"}
}
}
}'

*--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
ElasticSearch

I copied and slightly modified the example from the official doc, but
this fails:

$ curl -XPUT 'http://localhost:9200/wk-beta-com/created_datetime/_mapping'
-d '{
"created_datetime" : {
"properties" : {
"created_datetime" : {"type" : "string"},
}
}
}'

Why this error?
{"error":"MapperParsingException[Failed to parse mapping definition];
nested: JsonParseException[Unexpected character ('}' (code 125)): was
expecting either valid name character (for unquoted name) or double-quote
(for quoted) to start field name\n at [Source: {\n "created_datetime"
: {\n "properties" : {\n "created_datetime" :
{"type" : "string"},\n }\n }\n}; line: 5, column: 10]];
","status":400}

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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

So what happens if I have multiple mappings for the same thing?
Should the last take precedence or not?

I have other created_datetime mappings for the same index, which are
automatically created by the river and I don't want, how can I just stop
creating them or removing them?

On Thursday, February 7, 2013 3:07:16 PM UTC, andrea crotti wrote:

Thanks that was it.
Unfortunately I still don't see all the results that I should see..
If I got some errors previously because of malformed dates and I update
the mappings, should I immediately see the results which didn't come up
before?

Or is it anything else?

On Thursday, February 7, 2013 2:46:44 PM UTC, Rafał Kuć wrote:

Hello!

Try removing the comma character after "created_datetime" : {"type" :
"string"},", so your command looks like this:

$ curl -XPUT 'http://localhost:9200/wk-beta-com/created_datetime/_mapping'
-d '{
"created_datetime" : {
"properties" : {
"created_datetime" : {"type" : "string"}
}
}
}'

*--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
ElasticSearch

I copied and slightly modified the example from the official doc, but
this fails:

$ curl -XPUT 'http://localhost:9200/wk-beta-com/created_datetime/_mapping'
-d '{
"created_datetime" : {
"properties" : {
"created_datetime" : {"type" : "string"},
}
}
}'

Why this error?
{"error":"MapperParsingException[Failed to parse mapping definition];
nested: JsonParseException[Unexpected character ('}' (code 125)): was
expecting either valid name character (for unquoted name) or double-quote
(for quoted) to start field name\n at [Source: {\n "created_datetime"
: {\n "properties" : {\n "created_datetime" :
{"type" : "string"},\n }\n }\n}; line: 5, column: 10]];
","status":400}

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 elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

You cannot the type of a field once it has been indexed, so there is no
notion of precedence. If you are using a river, it is best to create the
index first with the correct mapping before creating the river.

--
Ivan

On Thu, Feb 7, 2013 at 7:31 AM, andrea crotti andrea.crotti.0@gmail.comwrote:

So what happens if I have multiple mappings for the same thing?
Should the last take precedence or not?

I have other created_datetime mappings for the same index, which are
automatically created by the river and I don't want, how can I just stop
creating them or removing them?

On Thursday, February 7, 2013 3:07:16 PM UTC, andrea crotti wrote:

Thanks that was it.
Unfortunately I still don't see all the results that I should see..
If I got some errors previously because of malformed dates and I update
the mappings, should I immediately see the results which didn't come up
before?

Or is it anything else?

On Thursday, February 7, 2013 2:46:44 PM UTC, Rafał Kuć wrote:

Hello!

Try removing the comma character after "created_datetime" : {"type" :
"string"},", so your command looks like this:

$ curl -XPUT 'http://localhost:9200/wk-beta-com/created_datetime/_
mapping http://localhost:9200/wk-beta-com/created_datetime/_mapping'
-d '{
"created_datetime" : {
"properties" : {
"created_datetime" : {"type" : "string"}
}
}
}'

*--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
ElasticSearch

I copied and slightly modified the example from the official doc, but
this fails:

$ curl -XPUT 'http://localhost:9200/wk-beta-com/created_datetime/_
mapping http://localhost:9200/wk-beta-com/created_datetime/_mapping'
-d '{
"created_datetime" : {
"properties" : {
"created_datetime" : {"type" : "string"},
}
}
}'

Why this error?
{"error":"**MapperParsingException[Failed to parse mapping definition];
nested: JsonParseException[Unexpected character ('}' (code 125)): was
expecting either valid name character (for unquoted name) or double-quote
(for quoted) to start field name\n at [Source: {\n "created_datetime"
: {\n "properties" : {\n "created_datetime" :
{"type" : "string"},\n }\n }\n}; line: 5, column: 10]];
","status":400}

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 elasticsearc...@googlegroups.**com.
For more options, visit https://groups.google.**com/groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.