Wares Plugin : Dynamic & Config Mappings question

Hi, this is my first post on this mailing list, Greetings from Málaga,
Spain :smiley:

@shay : Congratulations, the ES approach seems very, very interesting.

A few notes :

  • We find very attractive the ability to define mappings using JSON
    notation, which to my taste is lighter and easier to use XML files or
    Java APIs ( we previously had worked with Lucene API )

  • In a first step of integration of ES we can not use their "distributed
    capabilities", due to restrictions on the intranet which hosts our
    application in production. We therefore we consider that the proposed
    NodeServlet Ware plugin is a perfect choise for us.

  • NodeServlet : It´s clear that deploy it can no longer access the
    server on port 9200, but what happens to port 9300 ? , I ask because
    during the start we see the following messages :

9:46:03 - [Perfection] Bound to address [/ 0.0.0.0:9300]
9:46:03 - [Perfection] {inet bound_address [/ 0.0.0.0:9300]}, {inet
publish_address [/ 5.157.247.64:9300]}

  • Dynamic / Config Mappings : In principle we see no need to disable
    dynamic mapping, we find it useful, but we also need to define our
    custom mappings for certain types of data. We believe we have a problem
    here, because seems that NodeServlet is not detecting our JSON config
    files :

We have the following files :

/ WEB-INF/config/default-mapping.json
{
"default" : {
"date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"]
}
}

/ WEB-INF/config/mappings/myindex/mytype-mapping.json
{
"mytype" : {
"properties" : {
"property1" : {
"type" : "string"
},
"property2": {
"type" : "boolean"
}
}
}
}

And here is the resulting logging :

Then we see the logging and ...

09:46:07 - [Perfection] [myindex] using dynamic[true], default mapping:
location[null] and source[{
"default" : {
}
}]
09:46:07 - [Perfection] [myindex] using [resident] field cache with
max_size [-1], expire [null]
09:46:07 - [Perfection] [myindex] Using stats.refresh_interval [1s]
09:46:07 - [Perfection] [myindex] adding mapping [mytype ], source
[{"mytype":{"dynamic_date_formats":["yyyyMMdd","yyyy-MM-dd","dd-MM-yyyy","date_optional_time"],"properties":{"property1":{"type":"string"},"property2":{"type":"string"}]
09:46:07 - [Perfection] [myindex][0] creating shard

Here I could see two problems :

  1. The logging about the default mappings says that there is no default
    config file, but my custom date format appears when the Node is logging
    the adding of a a mapping for 'mytype'
  2. The logging make me suppose that the generated mapping related with
    'mytype' is provided by the dynamic.mapping feature, correct ? , Because
    I´ve defined that "property2" field as boolean and seems it´s not detected.
  • We are using Eclipse Indigo + Tomcat 6.0 with WTP plugin , perhaps we
    are inside a "configuration madness" :slight_smile: ?

Thanks in advance for all,
& Have a nice day

--
Antonio Miguel Fernández Rodríguez
Jaraxa Software, SL
www.jaraxa.com

2011/9/27 Antonio Fernández antonio.fernandez@jaraxa.com

**

Hi, this is my first post on this mailing list, Greetings from Málaga,
Spain :smiley:

@shay : Congratulations, the ES approach seems very, very interesting.

A few notes :

  • We find very attractive the ability to define mappings using JSON
    notation, which to my taste is lighter and easier to use XML files or Java
    APIs ( we previously had worked with Lucene API )

  • In a first step of integration of ES we can not use their "distributed
    capabilities", due to restrictions on the intranet which hosts our
    application in production. We therefore we consider that the proposed
    NodeServlet Ware plugin is a perfect choise for us.

  • NodeServlet : It´s clear that deploy it can no longer access the server
    on port 9200, but what happens to port 9300 ? , I ask because during the
    start we see the following messages :

9:46:03 - [Perfection] Bound to address [/ 0.0.0.0:9300]
9:46:03 - [Perfection] {inet bound_address [/ 0.0.0.0:9300]}, {inet
publish_address [/ 5.157.247.64:9300]}

It will still be started, and the zen discovery will also be started. If you
want just to run it on a single node, set node.local to true in the config.

  • Dynamic / Config Mappings : In principle we see no need to disable
    dynamic mapping, we find it useful, but we also need to define our custom
    mappings for certain types of data. We believe we have a problem here,
    because seems that NodeServlet is not detecting our JSON config files :

We have the following files :

/ WEB-INF/config/default-mapping.json
{
"default" : {
"date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"]
}
}

/ WEB-INF/config/mappings/myindex/mytype-mapping.json
{
"mytype" : {
"properties" : {
"property1" : {
"type" : "string"
},
"property2": {
"type" : "boolean"
}
}
}
}

And here is the resulting logging :

Then we see the logging and ...

09:46:07 - [Perfection] [myindex] using dynamic[true], default mapping:
location[null] and source[{
"default" : {
}
}]
09:46:07 - [Perfection] [myindex] using [resident] field cache with
max_size [-1], expire [null]
09:46:07 - [Perfection] [myindex] Using stats.refresh_interval [1s]
09:46:07 - [Perfection] [myindex] adding mapping [mytype ], source
[{"mytype":{"dynamic_date_formats":["yyyyMMdd","yyyy-MM-dd","dd-MM-yyyy","date_optional_time"],"properties":{"property1":{"type":"string"},"property2":{"type":"string"}]
09:46:07 - [Perfection] [myindex][0] creating shard

Here I could see two problems :

  1. The logging about the default mappings says that there is no default
    config file, but my custom date format appears when the Node is logging the
    adding of a a mapping for 'mytype'
  2. The logging make me suppose that the generated mapping related with
    'mytype' is provided by the dynamic.mapping feature, correct ? , Because
    I´ve defined that "property2" field as boolean and seems it´s not detected.

This might be config madness. Here is the logic to resolve the config (which
I have not checked how ti works within a web container):
https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/env/Environment.java#L163.
It will obviously not find it relative to ES_HOME, but, it might based on
the current class loader, not sure... . In theory, a better solution here is
to use the servlet context (or something similar, been ages since I did
servlets) to fetch the stream, but its tricky to get it there in a
non intrusive manner.

  • We are using Eclipse Indigo + Tomcat 6.0 with WTP plugin , perhaps we are
    inside a "configuration madness" :slight_smile: ?

Thanks in advance for all,
& Have a nice day

--
Antonio Miguel Fernández Rodríguez
Jaraxa Software, SL
www.jaraxa.com

El 27/09/2011 23:11, Shay Banon escribió:

2011/9/27 Antonio Fernández <antonio.fernandez@jaraxa.com
mailto:antonio.fernandez@jaraxa.com>

Hi, this is my first post on this mailing list, Greetings from
Málaga, Spain  :D

@shay : Congratulations, the ES approach seems very, very interesting.

A few notes :

- We find very attractive the ability to define mappings using
JSON notation, which to my taste is lighter and easier to use XML
files or Java APIs ( we previously had worked with Lucene API )

- In a first step of integration of ES we can not use their
"distributed capabilities", due to restrictions on the intranet
which hosts our application in production. We therefore we
consider that the proposed NodeServlet Ware plugin is a perfect
choise for us.

- NodeServlet : It´s clear that deploy it can no longer access the
server on port 9200, but what happens to port 9300 ? , I ask
because during the start we see the following messages :

9:46:03 - [Perfection] Bound to address [/ 0.0.0.0:9300
<http://0.0.0.0:9300>]
9:46:03 - [Perfection] {inet bound_address [/ 0.0.0.0:9300]},
{inet publish_address [/ 5.157.247.64:9300
<http://5.157.247.64:9300>]}

It will still be started, and the zen discovery will also be started.
If you want just to run it on a single node, set node.local to true in
the config.

Perfect & Thanks

- Dynamic / Config Mappings : In principle we see no need to
disable dynamic mapping, we find it useful, but we also need to
define our custom mappings for certain types of data. We believe
we have a problem here, because seems that NodeServlet is not
detecting our JSON config files :

We have the following files :

/ WEB-INF/config/default-mapping.json
{
    "_default_" : {
        "date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"]
    }
}

/ WEB-INF/config/mappings/myindex/mytype-mapping.json
{
    "mytype" : {
        "properties" : {
            "property1" : {
                "type" : "string"
            },
            "property2": {
                "type" : "boolean"
            }
        }
    }
}

And here is the resulting logging :

Then we see the logging and ...

09:46:07 - [Perfection] [myindex] using dynamic[true], default
mapping: location[null] and source[{
    "_default_" : {
    }
}]
09:46:07 - [Perfection] [myindex] using [resident] field cache
with max_size [-1], expire [null]
09:46:07 - [Perfection] [myindex] Using stats.refresh_interval [1s]
09:46:07 - [Perfection] [myindex] adding mapping [mytype ], source
[{"mytype":{"dynamic_date_formats":["yyyyMMdd","yyyy-MM-dd","dd-MM-yyyy","date_optional_time"],"properties":{"property1":{"type":"string"},"property2":{"type":"string"}]
09:46:07 - [Perfection] [myindex][0] creating shard

Here I could see two problems :

1) The logging about the default mappings says that there is no
default config file, but my custom date format appears when the
Node is logging the adding of a a mapping for 'mytype'
2) The logging make me suppose that the generated mapping related
with 'mytype' is provided by the dynamic.mapping feature, correct
? , Because I´ve defined that "property2" field as boolean and
seems it´s not detected.

This might be config madness. Here is the logic to resolve the config
(which I have not checked how ti works within a web container):
https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/env/Environment.java#L163.
It will obviously not find it relative to ES_HOME, but, it might based
on the current class loader, not sure... . In theory, a better
solution here is to use the servlet context (or something similar,
been ages since I did servlets) to fetch the stream, but its tricky to
get it there in a non intrusive manner.

I´ve included this file into the classpath of my project, and after
debugging & logging some messages seems it´s only called to resolving
the correct path for config files 'elasticsearch.yml',
'elasticsearch.properties', 'names.txt', but there is
nothing about resolving the correct path of
"/config/mappings/myindex/mytype.json".

Additionaly I tried putting my custom mapping inside
default-mapping.json as follow :

Option 1)

{
"default" : {
"date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"],
"myindex" : {
"settings" : {
"index" : {
"number_of_shards" : 3
}
},
"mappings" : {
"mytype" : {
"properties" : {
"property1" : {
"type" : "string"
},
"property2" : {
"type" : "boolean"
}
}
}
}
}
}
}

Option 2)

{
"default" : {
"date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"],
},
"myindex" : {
"settings" : {
"index" : {
"number_of_shards" : 3
}
},
"mappings" : {
"mytype" : {
"properties" : {
"property1" : {
"type" : "string"
},
"property2" : {
"type" : "boolean"
}
}
}
}
}

}

... additionaly I disabled the dynamic mapping feature to be completely
sure that my mappings are detected, but in both cases the results is :

16:12:48 - [Power Man] [grips] using dynamic[false], default mapping:
location[null] and source[{
"default" : {
"date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"]
},
"myindex" : {
//.........................................
}
}
]

16:12:48 - [Power Man] [myindex][4] failed to bulk item (index) index
{[myindex][mytype][91.21X00146A],
source[{"property1":"91.21X00146A","property2":"true"}]}
org.elasticsearch.indices.TypeMissingException: [myindex] type[mytype]
missing: typing to auto create mapping, but dynamic mapping is disabled

Thanks in advance,
& Have a nice day

- We are using Eclipse Indigo + Tomcat 6.0 with WTP plugin ,
perhaps we are inside a "configuration madness" :)   ?


Thanks in advance for all,
& Have a nice day


-- 
Antonio Miguel Fernández Rodríguez
Jaraxa Software, SL
www.jaraxa.com <http://www.jaraxa.com>

--
Antonio Miguel Fernández Rodríguez
Jaraxa Software, SL
www.jaraxa.com

I am not sure I understand the problem now... . Listing files obviously will
not work when data is directly used in a war file.

What you can do, is use the API to configure elasticsearch. For example,
when the node starts up, create an index template, that matches on *, with a
default mapping that configures the default configuration that you want
across all indices, types and mappings.

2011/9/28 Antonio Fernández antonio.fernandez@jaraxa.com

**
El 27/09/2011 23:11, Shay Banon escribió:

2011/9/27 Antonio Fernández antonio.fernandez@jaraxa.com

Hi, this is my first post on this mailing list, Greetings from Málaga,
Spain :smiley:

@shay : Congratulations, the ES approach seems very, very interesting.

A few notes :

  • We find very attractive the ability to define mappings using JSON
    notation, which to my taste is lighter and easier to use XML files or Java
    APIs ( we previously had worked with Lucene API )

  • In a first step of integration of ES we can not use their "distributed
    capabilities", due to restrictions on the intranet which hosts our
    application in production. We therefore we consider that the proposed
    NodeServlet Ware plugin is a perfect choise for us.

  • NodeServlet : It´s clear that deploy it can no longer access the server
    on port 9200, but what happens to port 9300 ? , I ask because during the
    start we see the following messages :

9:46:03 - [Perfection] Bound to address [/ 0.0.0.0:9300]
9:46:03 - [Perfection] {inet bound_address [/ 0.0.0.0:9300]}, {inet
publish_address [/ 5.157.247.64:9300]}

It will still be started, and the zen discovery will also be started. If
you want just to run it on a single node, set node.local to true in the
config.

Perfect & Thanks

  • Dynamic / Config Mappings : In principle we see no need to disable
    dynamic mapping, we find it useful, but we also need to define our custom
    mappings for certain types of data. We believe we have a problem here,
    because seems that NodeServlet is not detecting our JSON config files :

We have the following files :

/ WEB-INF/config/default-mapping.json
{
"default" : {
"date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"]
}
}

/ WEB-INF/config/mappings/myindex/mytype-mapping.json
{
"mytype" : {
"properties" : {
"property1" : {
"type" : "string"
},
"property2": {
"type" : "boolean"
}
}
}
}

And here is the resulting logging :

Then we see the logging and ...

09:46:07 - [Perfection] [myindex] using dynamic[true], default mapping:
location[null] and source[{
"default" : {
}
}]
09:46:07 - [Perfection] [myindex] using [resident] field cache with
max_size [-1], expire [null]
09:46:07 - [Perfection] [myindex] Using stats.refresh_interval [1s]
09:46:07 - [Perfection] [myindex] adding mapping [mytype ], source
[{"mytype":{"dynamic_date_formats":["yyyyMMdd","yyyy-MM-dd","dd-MM-yyyy","date_optional_time"],"properties":{"property1":{"type":"string"},"property2":{"type":"string"}]
09:46:07 - [Perfection] [myindex][0] creating shard

Here I could see two problems :

  1. The logging about the default mappings says that there is no default
    config file, but my custom date format appears when the Node is logging the
    adding of a a mapping for 'mytype'
  2. The logging make me suppose that the generated mapping related with
    'mytype' is provided by the dynamic.mapping feature, correct ? , Because
    I´ve defined that "property2" field as boolean and seems it´s not detected.

This might be config madness. Here is the logic to resolve the config
(which I have not checked how ti works within a web container):
https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/env/Environment.java#L163.
It will obviously not find it relative to ES_HOME, but, it might based on
the current class loader, not sure... . In theory, a better solution here is
to use the servlet context (or something similar, been ages since I did
servlets) to fetch the stream, but its tricky to get it there in a
non intrusive manner.

I´ve included this file into the classpath of my project, and after
debugging & logging some messages seems it´s only called to resolving the
correct path for config files 'elasticsearch.yml',
'elasticsearch.properties', 'names.txt', but there is
nothing about resolving the correct path of
"/config/mappings/myindex/mytype.json".

Additionaly I tried putting my custom mapping inside default-mapping.json
as follow :

Option 1)

{
"default" : {
"date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"],
"myindex" : {
"settings" : {
"index" : {
"number_of_shards" : 3
}
},
"mappings" : {

            "mytype" : {
                "properties" : {
                    "property1" : {
                        "type" : "string"
                    },
                    "property2" : {
                        "type" : "boolean"
                    }
                }
            }
        }
    }
}

}

Option 2)

{
"default" : {
"date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"],
},
"myindex" : {
"settings" : {
"index" : {
"number_of_shards" : 3
}
},
"mappings" : {

        "mytype" : {
            "properties" : {
                "property1" : {
                    "type" : "string"
                },
                "property2" : {
                    "type" : "boolean"
                }
            }
        }
    }
}

}

... additionaly I disabled the dynamic mapping feature to be completely
sure that my mappings are detected, but in both cases the results is :

16:12:48 - [Power Man] [grips] using dynamic[false], default mapping:
location[null] and source[{
"default" : {

    "date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",

"date_optional_time"]
},
"myindex" : {
//.........................................
}
}
]

16:12:48 - [Power Man] [myindex][4] failed to bulk item (index) index
{[myindex][mytype][91.21X00146A],
source[{"property1":"91.21X00146A","property2":"true"}]}
org.elasticsearch.indices.TypeMissingException: [myindex] type[mytype]
missing: typing to auto create mapping, but dynamic mapping is disabled

Thanks in advance,
& Have a nice day

  • We are using Eclipse Indigo + Tomcat 6.0 with WTP plugin , perhaps we
    are inside a "configuration madness" :slight_smile: ?

Thanks in advance for all,
& Have a nice day

--
Antonio Miguel Fernández Rodríguez
Jaraxa Software, SL
www.jaraxa.com

--
Antonio Miguel Fernández Rodríguez
Jaraxa Software, SLwww.jaraxa.com

El 02/10/2011 10:07, Shay Banon escribió:

I am not sure I understand the problem now... . Listing files
obviously will not work when data is directly used in a war file.

What you can do, is use the API to configure elasticsearch. For
example, when the node starts up, create an index template, that
matches on *, with a default mapping that configures the default
configuration that you want across all indices, types and mappings.

Hi again, thank you very much for your attention

Sorry for my English, I may have complicated the example.

I´m just trying to define config mapping JSON files as described here :

But seems there is a problem using the NodeServlet from Wares Plugin,
I´ve tried putting my [mapping_name].json files inside all this paths :

/WEB-INF/config/mappings/_default/mytype.json
/WEB-INF/config/mappings/myindex/mytype.json
/WEB-INF/classes/config/mappings/_default/mytype.json
/WEB-INF/classes/config/mappings/myindex/mytype.json

... but the config JSON seems is not detected in any case.

  • Could you say me what is the class where is resolved this logic to
    check in both /_default/ & /myindex/ folders ? Perhaps with an example....
  • It is correct the following JSON to define a type ?

*( mytype.json ) *

{
"mytype" : {
"properties" : {
"id" : {
"type" : "string"
},
"date" : {
"type" : "date"
}
}
}
}

  • I´ve tried with the DynamicMapping feature enabled and disabled. In
    the first case all the fields have always "string" as the type , and
    for the second case my documents are not indexed because there is no
    type "mytype" defined.

I hope that my problem is better understood.

Thanks in advance,
& Nice day for all
Antonio

2011/9/28 Antonio Fernández <antonio.fernandez@jaraxa.com
mailto:antonio.fernandez@jaraxa.com>

El 27/09/2011 23:11, Shay Banon escribió:
2011/9/27 Antonio Fernández <antonio.fernandez@jaraxa.com
<mailto:antonio.fernandez@jaraxa.com>>


    Hi, this is my first post on this mailing list, Greetings
    from Málaga, Spain  :D

    @shay : Congratulations, the ES approach seems very, very
    interesting.

    A few notes :

    - We find very attractive the ability to define mappings
    using JSON notation, which to my taste is lighter and easier
    to use XML files or Java APIs ( we previously had worked with
    Lucene API )

    - In a first step of integration of ES we can not use their
    "distributed capabilities", due to restrictions on the
    intranet which hosts our application in production. We
    therefore we consider that the proposed NodeServlet Ware
    plugin is a perfect choise for us.

    - NodeServlet : It´s clear that deploy it can no longer
    access the server on port 9200, but what happens to port 9300
    ? , I ask because during the start we see the following
    messages :

    9:46:03 - [Perfection] Bound to address [/ 0.0.0.0:9300
    <http://0.0.0.0:9300>]
    9:46:03 - [Perfection] {inet bound_address [/ 0.0.0.0:9300]},
    {inet publish_address [/ 5.157.247.64:9300
    <http://5.157.247.64:9300>]}


It will still be started, and the zen discovery will also be
started. If you want just to run it on a single node, set
node.local to true in the config.
Perfect & Thanks
    - Dynamic / Config Mappings : In principle we see no need to
    disable dynamic mapping, we find it useful, but we also need
    to define our custom mappings for certain types of data. We
    believe we have a problem here, because seems that
    NodeServlet is not detecting our JSON config files :

    We have the following files :

    / WEB-INF/config/default-mapping.json
    {
        "_default_" : {
            "date_formats" : ["yyyyMMdd", "yyyy-MM-dd",
    "dd-MM-yyyy", "date_optional_time"]
        }
    }

    / WEB-INF/config/mappings/myindex/mytype-mapping.json
    {
        "mytype" : {
            "properties" : {
                "property1" : {
                    "type" : "string"
                },
                "property2": {
                    "type" : "boolean"
                }
            }
        }
    }

    And here is the resulting logging :

    Then we see the logging and ...

    09:46:07 - [Perfection] [myindex] using dynamic[true],
    default mapping: location[null] and source[{
        "_default_" : {
        }
    }]
    09:46:07 - [Perfection] [myindex] using [resident] field
    cache with max_size [-1], expire [null]
    09:46:07 - [Perfection] [myindex] Using
    stats.refresh_interval [1s]
    09:46:07 - [Perfection] [myindex] adding mapping [mytype ],
    source
    [{"mytype":{"dynamic_date_formats":["yyyyMMdd","yyyy-MM-dd","dd-MM-yyyy","date_optional_time"],"properties":{"property1":{"type":"string"},"property2":{"type":"string"}]
    09:46:07 - [Perfection] [myindex][0] creating shard

    Here I could see two problems :

    1) The logging about the default mappings says that there is
    no default config file, but my custom date format appears
    when the Node is logging the adding of a a mapping for 'mytype'
    2) The logging make me suppose that the generated mapping
    related with 'mytype' is provided by the dynamic.mapping
    feature, correct ? , Because I´ve defined that "property2"
    field as boolean and seems it´s not detected.


This might be config madness. Here is the logic to resolve the
config (which I have not checked how ti works within a web
container):
https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/env/Environment.java#L163.
It will obviously not find it relative to ES_HOME, but, it might
based on the current class loader, not sure... . In theory, a
better solution here is to use the servlet context (or something
similar, been ages since I did servlets) to fetch the stream, but
its tricky to get it there in a non intrusive manner.
I´ve included this file into the classpath of my project, and
after debugging & logging some messages seems it´s  only called to
resolving the correct path for config files 'elasticsearch.yml',
'elasticsearch.properties', 'names.txt', but there is
nothing about resolving the correct path of
"/config/mappings/myindex/mytype.json".


Additionaly I tried putting my custom mapping inside
default-mapping.json as follow :

Option 1)

{
    "_default_" : {
        "date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"],
        "myindex" : {
            "settings" : {
                "index" : {
                    "number_of_shards" : 3
                }
            },
            "mappings" : {

                "mytype" : {
                    "properties" : {
                        "property1" : {
                            "type" : "string"
                        },
                        "property2" : {
                            "type" : "boolean"
                        }
                    }
                }
            }
        }
    }
}

Option 2)

{
    "_default_" : {
        "date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"],
    },
    "myindex" : {
        "settings" : {
            "index" : {
                "number_of_shards" : 3
            }
        },
        "mappings" : {

            "mytype" : {
                "properties" : {
                    "property1" : {
                        "type" : "string"
                    },
                    "property2" : {
                        "type" : "boolean"
                    }
                }
            }
        }
    }

}

... additionaly I disabled the dynamic mapping feature to be
completely sure that my mappings are detected, but in both cases
the results is :


16:12:48 - [Power Man] [grips] using dynamic[false], default
mapping: location[null] and source[{
    "_default_" : {

        "date_formats" : ["yyyyMMdd", "yyyy-MM-dd", "dd-MM-yyyy",
"date_optional_time"]
    },
    "myindex" : {
        //.........................................
    }
}
]


16:12:48 - [Power Man] [myindex][4] failed to bulk item (index)
index {[myindex][mytype][91.21X00146A],
source[{"property1":"91.21X00146A","property2":"true"}]}
org.elasticsearch.indices.TypeMissingException: [myindex]
type[mytype] missing: typing to auto create mapping, but dynamic
mapping is disabled


Thanks in advance,
& Have a nice day
    - We are using Eclipse Indigo + Tomcat 6.0 with WTP plugin ,
    perhaps we are inside a "configuration madness" :)   ?


    Thanks in advance for all,
    & Have a nice day


    -- 
    Antonio Miguel Fernández Rodríguez
    Jaraxa Software, SL
    www.jaraxa.com <http://www.jaraxa.com>
-- 
Antonio Miguel Fernández Rodríguez
Jaraxa Software, SL
www.jaraxa.com  <http://www.jaraxa.com>

--
Antonio Miguel Fernández Rodríguez
Jaraxa Software, SL
www.jaraxa.com