917d896cad1a5bae2c49005874a6032f0d8f21ee
[ccsdk/features.git] /
1 #!/bin/sh
2
3 curl -XDELETE 'http://localhost:9200/conflicting_field_type'
4 echo
5 curl -XPUT 'http://localhost:9200/conflicting_field_type'
6 echo
7 curl -XPUT 'http://localhost:9200/conflicting_field_type/map1/_mapping' -d '{
8   "map1": {
9     "date_formats": ["date_time", "yyyyMMddHHmmss", "yyyyMMddHHmmssSSS"],
10     "_all": {
11       "enabled": true,
12       "store": "yes"
13     },
14     "properties": {
15       "field1": {
16         "type": "date",
17         "store": "yes",
18         "format": "yyyyMMddHHmmssSSS",
19         "include_in_all": false
20       }
21     }
22   }
23 }'
24 echo
25 curl -XPUT 'http://localhost:9200/conflicting_field_type/map2/_mapping' -d '{
26   "map2": {
27     "date_formats": ["date_time", "yyyyMMddHHmmss", "yyyyMMddHHmmssSSS"],
28     "_all": {
29       "enabled": true,
30       "store": "yes"
31     },
32     "properties": {
33       "field1": {
34         "type": "string",
35         "store": "yes",
36         "term_vector": "yes",
37         "include_in_all": false
38       }
39     }
40   }
41 }'
42 echo
43 curl -XPUT 'http://localhost:9200/conflicting_field_type/map1/1' -d '{
44     "field1" : "20110214172449000"
45 }'
46 echo
47 curl -XPUT 'http://localhost:9200/conflicting_field_type/map2/2' -d '{
48     "field1" : "Test map2 with string type field"
49 }'
50 echo