Hey,

using your curl call you only set the mapping for existing indices, but not
for newly created ones. You may want to consider using index templates for
this specific field.


--Alex


On Mon, Jun 9, 2014 at 4:45 PM, sirkubax <jakubxmuszyn...@googlemail.com>
wrote:

> As I did mention here
> https://groups.google.com/forum/#!topic/elasticsearch/7Bn5Pc6TSgs
> I have some sorting issue when date is stored in string format.
>
>
>
> *I did try to set field format as date, but it is overide when date is
> inserted into index.The mapping was:*
>
> curl -XPUT localhost:9200/*/_mapping/loglog -d '
> {
>     "loglog" : {
>         "properties" : {
>             "testdate7" : {"type" : "date", "format" : "yyyy-MM-dd
> HH:mm:ss.SSSSSS",  "store" : true }
>         }
>     }
> }
> '
>
> *but after while it become:*
>
> "properties" : {
>           "testdate7" : {
>             "type" : "string",
>             "norms" : {
>               "enabled" : false
>             },
>
>
> *I guess it may be caused by *
>
> "dynamic_templates" : [ {
>           "*string*_*fields*" : {
>             "mapping" : {
>               "type" : "multi_field",
>               "fields" : {
>                 "raw" : {
>                   "index" : "not_analyzed",
>                   "ignore_above" : 256,
>                   "type" : "string"
>                 },
>                 "{name}" : {
>                   "index" : "analyzed",
>                   "omit_norms" : true,
>                   "type" : "string"
>                 }
>               }
>             },
>             "match" : "*",
>             "match_mapping_type" : "string"
>           }
>         } ],
>
>
>
>
>
>
>
> *So the question os, how create mappint that would cover that issue.The
> message that is insterted looks like:*
> "ANYTHING (pid: 23291, thread: 4131280592) ********] [* aa.xx:555: MSG(3)
> 2014-06-09 10:50:08.255111 ... "
>
>
> *I did try to set*
>  "dynamic_date_formats" : ["date_optional_time", "yyyy-MM-dd
> HH:mm:ss.SSSSSS"],
> *but I think I did not set it properly.*
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/bf31ea3f-292b-451b-aa14-0ef2f3632f44%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/bf31ea3f-292b-451b-aa14-0ef2f3632f44%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8cXo_Hx7-UszUWcWsE51k0q4AMKNamr-6Zq1%2BLAVMMzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to