Problem with dynamic-mapping.json

Hi,

We are working on a system that requires each tenant to have their own
index. Each index may have multiple object types (in the example
below: aaa and xxx). We need to control the field names so we wanted
to use the conf/dynamic-mapping.json file to define the field names in
advance.
We prefer to do this when the system is loaded instead of having to
redefine it for each tenant when it is created.

The dynamic-mapping.json includes two objects, like so:

{
"xxx" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
},

"aaa" : {
  "type" : "object",
  "path" : "just_name",
  "properties" : {
    "bbb" : {
      "type" : "object",
      "path" : "just_name",
      "properties" : {
        "field2" : { "index_name" : "f2", type: "string" },
        "field1" : { "index_name" : "f1", type: "string" }
      }
    }
  }
}

}

When doing this, we get an exeption when indexing this document:
curl -XPUT http://localhost:9200/index/xxx/1 -d '{"yyy": {field1:
"test1", field3: "test3"}}'

Exception is:
org.elasticsearch.index.mapper.MapperParsingException: Mapping must
have the type as the root object
at
org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.extractMapping(XContentDocumentMapperParser.java:
235)
at
org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.parse(XContentDocumentMapperParser.java:
106)
at
org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.parse(XContentDocumentMapperParser.java:
46)

When working with a single object in the dynamic-mapping.json it works
OK.
Another thing we tried is using the config/mappings/_default folder to
achieve this (created two files called aaa.json and xxx.json with the
relevant content in each file). This resulted in a response from
elastic search:
{"error":"nested: "}
without an exception on ES.

BTW, in the documentation, it says that the file name is dynamic-
mapping.json (http://www.elasticsearch.com/docs/elasticsearch/mapping/
dynamic_mapping/). We also saw a reference to this file in the code.
In one of the bug fixes (http://github.com/elasticsearch/elasticsearch/
issues/closed#issue/275) it says that the file is now called default-
mapping.json or is this a different file? Which should be used for
what?

Thanks,
Tal

This was refactored heavily in 0.9.0. What version are you using?

-- jim

On Thu, Jul 29, 2010 at 7:25 AM, Tal talsalmona@gmail.com wrote:

Hi,

We are working on a system that requires each tenant to have their own
index. Each index may have multiple object types (in the example
below: aaa and xxx). We need to control the field names so we wanted
to use the conf/dynamic-mapping.json file to define the field names in
advance.
We prefer to do this when the system is loaded instead of having to
redefine it for each tenant when it is created.

The dynamic-mapping.json includes two objects, like so:

{
"xxx" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
},

"aaa" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"bbb" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field2" : { "index_name" : "f2", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
}

}

When doing this, we get an exeption when indexing this document:
curl -XPUT http://localhost:9200/index/xxx/1 -d '{"yyy": {field1:
"test1", field3: "test3"}}'

Exception is:
org.elasticsearch.index.mapper.MapperParsingException: Mapping must
have the type as the root object
at

org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.extractMapping(XContentDocumentMapperParser.java:
235)
at

org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.parse(XContentDocumentMapperParser.java:
106)
at

org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.parse(XContentDocumentMapperParser.java:
46)

When working with a single object in the dynamic-mapping.json it works
OK.
Another thing we tried is using the config/mappings/_default folder to
achieve this (created two files called aaa.json and xxx.json with the
relevant content in each file). This resulted in a response from
Elasticsearch:
{"error":"nested: "}
without an exception on ES.

BTW, in the documentation, it says that the file name is dynamic-
mapping.json (http://www.elasticsearch.com/docs/elasticsearch/mapping/
dynamic_mapping/). We also saw a reference to this file in the code.
In one of the bug fixes (GitHub - elastic/elasticsearch: Free and Open, Distributed, RESTful Search Engine
issues/closed#issue/275) it says that the file is now called default-
mapping.json or is this a different file? Which should be used for
what?

Thanks,
Tal

0.9.0

On Jul 29, 4:32 pm, James Cook jc...@tracermedia.com wrote:

This was refactored heavily in 0.9.0. What version are you using?

-- jim

On Thu, Jul 29, 2010 at 7:25 AM, Tal talsalm...@gmail.com wrote:

Hi,

We are working on a system that requires each tenant to have their own
index. Each index may have multiple object types (in the example
below: aaa and xxx). We need to control the field names so we wanted
to use the conf/dynamic-mapping.json file to define the field names in
advance.
We prefer to do this when the system is loaded instead of having to
redefine it for each tenant when it is created.

The dynamic-mapping.json includes two objects, like so:

{
"xxx" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
},

"aaa" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"bbb" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field2" : { "index_name" : "f2", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
}

}

When doing this, we get an exeption when indexing this document:
curl -XPUThttp://localhost:9200/index/xxx/1-d '{"yyy": {field1:
"test1", field3: "test3"}}'

Exception is:
org.elasticsearch.index.mapper.MapperParsingException: Mapping must
have the type as the root object
at

org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.extractMapping(XContentDocumentMapperParser.java:
235)
at

org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.parse(XContentDocumentMapperParser.java:
106)
at

org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.parse(XContentDocumentMapperParser.java:
46)

When working with a single object in the dynamic-mapping.json it works
OK.
Another thing we tried is using the config/mappings/_default folder to
achieve this (created two files called aaa.json and xxx.json with the
relevant content in each file). This resulted in a response from
Elasticsearch:
{"error":"nested: "}
without an exception on ES.

BTW, in the documentation, it says that the file name is dynamic-
mapping.json (http://www.elasticsearch.com/docs/elasticsearch/mapping/
dynamic_mapping/). We also saw a reference to this file in the code.
In one of the bug fixes (GitHub - elastic/elasticsearch: Free and Open, Distributed, RESTful Search Engine
issues/closed#issue/275) it says that the file is now called default-
mapping.json or is this a different file? Which should be used for
what?

Thanks,
Tal

In 0.9, the name was changed to default-mapping.json, check the docs for it
here:
http://www.elasticsearch.com/docs/elasticsearch/mapping/dynamic_mapping/.
Also note that you can only place single "default" mapping as it applies
to type level mappings created (for example, by put_mapping).

I think what you want is covered here:
http://www.elasticsearch.com/docs/elasticsearch/mapping/builtin_mappings/,
which is the ability to predefine mappings for indices when they are
created.

-shay.banon

On Thu, Jul 29, 2010 at 5:31 PM, Tal talsalmona@gmail.com wrote:

0.9.0

On Jul 29, 4:32 pm, James Cook jc...@tracermedia.com wrote:

This was refactored heavily in 0.9.0. What version are you using?

-- jim

On Thu, Jul 29, 2010 at 7:25 AM, Tal talsalm...@gmail.com wrote:

Hi,

We are working on a system that requires each tenant to have their own
index. Each index may have multiple object types (in the example
below: aaa and xxx). We need to control the field names so we wanted
to use the conf/dynamic-mapping.json file to define the field names in
advance.
We prefer to do this when the system is loaded instead of having to
redefine it for each tenant when it is created.

The dynamic-mapping.json includes two objects, like so:

{
"xxx" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
},

"aaa" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"bbb" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field2" : { "index_name" : "f2", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
}

}

When doing this, we get an exeption when indexing this document:
curl -XPUThttp://localhost:9200/index/xxx/1-d '{"yyy": {field1:
"test1", field3: "test3"}}'

Exception is:
org.elasticsearch.index.mapper.MapperParsingException: Mapping must
have the type as the root object
at

org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.extractMapping(XContentDocumentMapperParser.java:

  1. at

org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.parse(XContentDocumentMapperParser.java:

  1. at

org.elasticsearch.index.mapper.xcontent.XContentDocumentMapperParser.parse(XContentDocumentMapperParser.java:

When working with a single object in the dynamic-mapping.json it works
OK.
Another thing we tried is using the config/mappings/_default folder to
achieve this (created two files called aaa.json and xxx.json with the
relevant content in each file). This resulted in a response from
Elasticsearch:
{"error":"nested: "}
without an exception on ES.

BTW, in the documentation, it says that the file name is dynamic-
mapping.json (http://www.elasticsearch.com/docs/elasticsearch/mapping/
dynamic_mapping/). We also saw a reference to this file in the code.
In one of the bug fixes (
GitHub - elastic/elasticsearch: Free and Open, Distributed, RESTful Search Engine
issues/closed#issue/275) it says that the file is now called default-
mapping.json or is this a different file? Which should be used for
what?

Thanks,
Tal

In the example above I also tried to create a file called xxx.json and
put it in the config/mappings/_default folder with the following
content:

{
"xxx" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
}
}

but when I indexed the following:
curl -XPUT http://localhost:9200/index/xxx/1 -d '{"yyy":
{field1:"test1", field3: "test3"}}'

I get the following response: {"error":"nested: "}
Nothing is printed in the elastic search log.

Maybe its because you put yyy in the json you want to index for xxx?
Seems like you are getting an internal null pointer exception in
elasticsearch, what are the exact steps you created it? I will try and
recreate it and get a better error message.

-shay.banon

On Fri, Jul 30, 2010 at 4:58 PM, Tal talsalmona@gmail.com wrote:

In the example above I also tried to create a file called xxx.json and
put it in the config/mappings/_default folder with the following
content:

{
"xxx" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
}
}

but when I indexed the following:
curl -XPUT http://localhost:9200/index/xxx/1 -d '{"yyy":
{field1:"test1", field3: "test3"}}'

I get the following response: {"error":"nested: "}
Nothing is printed in the Elasticsearch log.

I thought the root element of the xxx.json should be xxx (the same as
it would have been had it been placed in the conf/default-
mapping.json).
I also tried modifying the file by putting "yyy" as the root element
but I get the same error.

Here are the steps to reproduce:

  1. Create a file conf/mappings/_default/xxx.json with the following
    content:
    "yyy" : {
    "type" : "object",
    "path" : "just_name",
    "properties" : {
    "field3" : { "index_name" : "f3", type: "string" },
    "field1" : { "index_name" : "f1", type: "string" }
    }
    }

  2. Try indexing the following document by running curl:
    curl -XPUT http://localhost:9200/index/xxx/1 -d '{"yyy":
    {field1:"test1", field3: "test3"}}'

==>
Expected result:

a. Document is indexed and the dynamic mapping of the xxx type is
unaffected (remains according to the definition in xxx.json)
b. the query string "f1:test1" should return the document.

Actual result:

Elastic Search returns:
{"error":"nested: "}

No error is logged in the Elasticsearch log file.

Thanks,
Tal

On Jul 30, 6:58 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Maybe its because you put yyy in the json you want to index for xxx?
Seems like you are getting an internal null pointer exception in
elasticsearch, what are the exact steps you created it? I will try and
recreate it and get a better error message.

-shay.banon

On Fri, Jul 30, 2010 at 4:58 PM, Tal talsalm...@gmail.com wrote:

In the example above I also tried to create a file called xxx.json and
put it in the config/mappings/_default folder with the following
content:

{
"xxx" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
}
}

but when I indexed the following:
curl -XPUThttp://localhost:9200/index/xxx/1-d '{"yyy":
{field1:"test1", field3: "test3"}}'

I get the following response: {"error":"nested: "}
Nothing is printed in the Elasticsearch log.

Strange, I followed the mentioned steps, and did not get a problem. Though,
there are some misunderstandings:

  1. When you create a file called xxx.json, then the type should also be xxx,
    and not yyy (within the json).
  2. You should place it under config/mappings/_default, and not
    conf/mappings/_default
  3. When you index something under the type xxx, then the content should be
    under xxx, and not with yyy as you indexed.
  4. Not related, but I don't think you need the just_name path, it rarely
    needs to be set.

-shay.banon

On Fri, Jul 30, 2010 at 10:25 PM, Tal talsalmona@gmail.com wrote:

I thought the root element of the xxx.json should be xxx (the same as
it would have been had it been placed in the conf/default-
mapping.json).
I also tried modifying the file by putting "yyy" as the root element
but I get the same error.

Here are the steps to reproduce:

  1. Create a file conf/mappings/_default/xxx.json with the following
    content:
    "yyy" : {
    "type" : "object",
    "path" : "just_name",
    "properties" : {
    "field3" : { "index_name" : "f3", type: "string" },
    "field1" : { "index_name" : "f1", type: "string" }
    }
    }

  2. Try indexing the following document by running curl:
    curl -XPUT http://localhost:9200/index/xxx/1 -d '{"yyy":
    {field1:"test1", field3: "test3"}}'

==>
Expected result:

a. Document is indexed and the dynamic mapping of the xxx type is
unaffected (remains according to the definition in xxx.json)
b. the query string "f1:test1" should return the document.

Actual result:

Elastic Search returns:
{"error":"nested: "}

No error is logged in the Elasticsearch log file.

Thanks,
Tal

On Jul 30, 6:58 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Maybe its because you put yyy in the json you want to index for xxx?
Seems like you are getting an internal null pointer exception in
elasticsearch, what are the exact steps you created it? I will try and
recreate it and get a better error message.

-shay.banon

On Fri, Jul 30, 2010 at 4:58 PM, Tal talsalm...@gmail.com wrote:

In the example above I also tried to create a file called xxx.json and
put it in the config/mappings/_default folder with the following
content:

{
"xxx" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", type: "string" },
"field1" : { "index_name" : "f1", type: "string" }
}
}
}
}
}

but when I indexed the following:
curl -XPUThttp://localhost:9200/index/xxx/1-d '{"yyy":
{field1:"test1", field3: "test3"}}'

I get the following response: {"error":"nested: "}
Nothing is printed in the Elasticsearch log.

Maybe the terminology is wrong.
I thought that when I do something like this:
curl -XPUT http://localhost:9200/abc/xyz/1 -d ........
then the "index" is "abc" and the "type" is "xyz".

In my example above I'm using the url http://localhost:9200/index/xxx
so the type IS "xxx"
Anyway, I tried to wrap the json I'm sending with an "xxx" object like
so:

{
"xxx": {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", "type": "string" },
"field1" : { "index_name" : "f1", "type": "string" }
}
}
}
}

But still getting the same problem.
Tried to run this on Win Vista and on Ubuntu.

Regarding the placement of the file, I was wrong in my post. I did
place it under config/mappings/_default.

Regarding "just_name", what I'm trying to achieve is to be able to
refer to properties in a simple way without the full path since my
objects are complex (in real life, not in this example).
In the example above I'd expect to be able to find the document by
searching for "f1:test1" instead of "yyy.field1:test1"

Thanks,
Tal

So in your case, yyy is an object within the xxx type? Something like:

{
xxx : {
yyy : {
field1 : "value"
}
}
}

In this case, you need to have it defined within properties of xxx mapping
definition. Check this example:
http://www.elasticsearch.com/docs/elasticsearch/mapping/object_type/.

Strange that I can't recreate it..., you sure you are running with 0.9?

-shay.banon

On Sat, Jul 31, 2010 at 12:02 AM, Tal talsalmona@gmail.com wrote:

Maybe the terminology is wrong.
I thought that when I do something like this:
curl -XPUT http://localhost:9200/abc/xyz/1 -d ........
then the "index" is "abc" and the "type" is "xyz".

In my example above I'm using the url http://localhost:9200/index/xxx
so the type IS "xxx"
Anyway, I tried to wrap the json I'm sending with an "xxx" object like
so:

{
"xxx": {
"yyy" : {
"type" : "object",
"path" : "just_name",
"properties" : {
"field3" : { "index_name" : "f3", "type": "string" },
"field1" : { "index_name" : "f1", "type": "string" }
}
}
}
}

But still getting the same problem.
Tried to run this on Win Vista and on Ubuntu.

Regarding the placement of the file, I was wrong in my post. I did
place it under config/mappings/_default.

Regarding "just_name", what I'm trying to achieve is to be able to
refer to properties in a simple way without the full path since my
objects are complex (in real life, not in this example).
In the example above I'd expect to be able to find the document by
searching for "f1:test1" instead of "yyy.field1:test1"

Thanks,
Tal

Yes, yyy is an object within the xxx type.

I'm using 0.9.0.

Here is my config folder:
https://docs.google.com/leaf?id=0B68WZXvnkGUTMjJmODFiMDMtYWY0OS00OTJhLWI3Y2EtZTNjZTQzM2QwOTFh&sort=name&layout=list&num=50

This is the call I'm doing:
curl -XPUT http://localhost:9200/index/xxx/1 -d '{"yyy":
{field1:"test1", field3: "test3"}}'

Thanks,
Tal

Can get the document you link to.

In any case, I also noted the mapping change you need to make (based no the
last mapping you attached). The mapping for "yyy" needs to come under
properties. Check the link I sent (
http://www.elasticsearch.com/docs/elasticsearch/mapping/object_type/), where
tweet in the type and "person" is the inner object. Tweet maps to "xxx" in
our case, and "person" maps to "yyy.

-shay.banon

On Sat, Jul 31, 2010 at 9:57 AM, Tal talsalmona@gmail.com wrote:

Yes, yyy is an object within the xxx type.

I'm using 0.9.0.

Here is my config folder:

config.tar.gz - Google Drive

This is the call I'm doing:
curl -XPUT http://localhost:9200/index/xxx/1 -d '{"yyy":
{field1:"test1", field3: "test3"}}'

Thanks,
Tal

Try again, the attachment should be accessible now.

Thanks,
Tal

On Jul 31, 10:41 am, Shay Banon shay.ba...@elasticsearch.com wrote:

Can get the document you link to.

In any case, I also noted the mapping change you need to make (based no the
last mapping you attached). The mapping for "yyy" needs to come under
properties. Check the link I sent (http://www.elasticsearch.com/docs/elasticsearch/mapping/object_type/), where
tweet in the type and "person" is the inner object. Tweet maps to "xxx" in
our case, and "person" maps to "yyy.

-shay.banon

On Sat, Jul 31, 2010 at 9:57 AM, Tal talsalm...@gmail.com wrote:

Yes, yyy is an object within the xxx type.

I'm using 0.9.0.

Here is my config folder:

https://docs.google.com/leaf?id=0B68WZXvnkGUTMjJmODFiMDMtYWY0OS00OTJh...

This is the call I'm doing:
curl -XPUThttp://localhost:9200/index/xxx/1-d '{"yyy":
{field1:"test1", field3: "test3"}}'

Thanks,
Tal

Hi,

Ok, managed to recreate this. The first problem is that the json you
provided in the mappings (xxx.json) is malformed. The second problem (and
its something I fixed post 0.9.0) was wrong handling of the
config/mappings/[index_name] causing an NPE. I fixed it in master (will be
part of 0.9.1). Someone on the mailing list spotted that a week or so ago.
Here is the issue:
Mapper: Wrong check for `config/mappings/[index_name]` causing failure to create index · Issue #284 · elastic/elasticsearch · GitHub.

-shay.banon

On Sat, Jul 31, 2010 at 11:34 AM, Tal talsalmona@gmail.com wrote:

Try again, the attachment should be accessible now.

config.tar.gz - Google Drive

Thanks,
Tal

On Jul 31, 10:41 am, Shay Banon shay.ba...@elasticsearch.com wrote:

Can get the document you link to.

In any case, I also noted the mapping change you need to make (based no
the
last mapping you attached). The mapping for "yyy" needs to come under
properties. Check the link I sent (
http://www.elasticsearch.com/docs/elasticsearch/mapping/object_type/),
where
tweet in the type and "person" is the inner object. Tweet maps to "xxx"
in
our case, and "person" maps to "yyy.

-shay.banon

On Sat, Jul 31, 2010 at 9:57 AM, Tal talsalm...@gmail.com wrote:

Yes, yyy is an object within the xxx type.

I'm using 0.9.0.

Here is my config folder:

https://docs.google.com/leaf?id=0B68WZXvnkGUTMjJmODFiMDMtYWY0OS00OTJh.
..

This is the call I'm doing:
curl -XPUThttp://localhost:9200/index/xxx/1-d '{"yyy":
{field1:"test1", field3: "test3"}}'

Thanks,
Tal

Thanks,
I'll try to rebuild from master.

Tal

On Jul 31, 3:45 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Hi,

Ok, managed to recreate this. The first problem is that the json you
provided in the mappings (xxx.json) is malformed. The second problem (and
its something I fixed post 0.9.0) was wrong handling of the
config/mappings/[index_name] causing an NPE. I fixed it in master (will be
part of 0.9.1). Someone on the mailing list spotted that a week or so ago.
Here is the issue:Mapper: Wrong check for `config/mappings/[index_name]` causing failure to create index · Issue #284 · elastic/elasticsearch · GitHub.

-shay.banon

On Sat, Jul 31, 2010 at 11:34 AM, Tal talsalm...@gmail.com wrote:

Try again, the attachment should be accessible now.

https://docs.google.com/leaf?id=0B68WZXvnkGUTMjJmODFiMDMtYWY0OS00OTJh...

Thanks,
Tal

On Jul 31, 10:41 am, Shay Banon shay.ba...@elasticsearch.com wrote:

Can get the document you link to.

In any case, I also noted the mapping change you need to make (based no
the
last mapping you attached). The mapping for "yyy" needs to come under
properties. Check the link I sent (
http://www.elasticsearch.com/docs/elasticsearch/mapping/object_type/),
where
tweet in the type and "person" is the inner object. Tweet maps to "xxx"
in
our case, and "person" maps to "yyy.

-shay.banon

On Sat, Jul 31, 2010 at 9:57 AM, Tal talsalm...@gmail.com wrote:

Yes, yyy is an object within the xxx type.

I'm using 0.9.0.

Here is my config folder:

https://docs.google.com/leaf?id=0B68WZXvnkGUTMjJmODFiMDMtYWY0OS00OTJh.
..

This is the call I'm doing:
curl -XPUThttp://localhost:9200/index/xxx/1-d'{"yyy":
{field1:"test1", field3: "test3"}}'

Thanks,
Tal