aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/test/generators/conflictingField.sh
blob: 917d896cad1a5bae2c49005874a6032f0d8f21ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

curl -XDELETE 'http://localhost:9200/conflicting_field_type'
echo
curl -XPUT 'http://localhost:9200/conflicting_field_type'
echo
curl -XPUT 'http://localhost:9200/conflicting_field_type/map1/_mapping' -d '{
  "map1": {
    "date_formats": ["date_time", "yyyyMMddHHmmss", "yyyyMMddHHmmssSSS"],
    "_all": {
      "enabled": true,
      "store": "yes"
    },
    "properties": {
      "field1": {
        "type": "date",
        "store": "yes",
        "format": "yyyyMMddHHmmssSSS",
        "include_in_all": false
      }
    }
  }
}'
echo
curl -XPUT 'http://localhost:9200/conflicting_field_type/map2/_mapping' -d '{
  "map2": {
    "date_formats": ["date_time", "yyyyMMddHHmmss", "yyyyMMddHHmmssSSS"],
    "_all": {
      "enabled": true,
      "store": "yes"
    },
    "properties": {
      "field1": {
        "type": "string",
        "store": "yes",
        "term_vector": "yes",
        "include_in_all": false
      }
    }
  }
}'
echo
curl -XPUT 'http://localhost:9200/conflicting_field_type/map1/1' -d '{
    "field1" : "20110214172449000"
}'
echo
curl -XPUT 'http://localhost:9200/conflicting_field_type/map2/2' -d '{
    "field1" : "Test map2 with string type field"
}'
echo