-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_es_index.sh
38 lines (32 loc) · 1.48 KB
/
create_es_index.sh
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
curl -XPOST "http://${1}:9200/wines" -d '{
"settings" : {
"number_of_shards" : 3,
"number_of_replicas" : 0
}
}'
curl -XPUT "http://${1}:9200/wines/product/_mapping" -d '{
"product" : {
"properties" : {
"Url" : {"type" : "string", "store" : true },
"Name" : {"type" : "string", "store" : true },
"WineType" : {"type" : "string", "store" : true },
"Producer" : {"type" : "string", "store" : true },
"Wholesaler" : {"type" : "string", "store" : true },
"Material" : {"type" : "string", "store" : true },
"Country" : {"type" : "string", "store" : true },
"Subcountry" : {"type" : "string", "store" : true },
"Store" : {"type" : "string", "store" : true },
"Distributor" : {"type" : "string", "store" : true },
"Prodnum" : {"type" : "integer", "store" : true },
"Vintage" : {"type" : "integer", "store" : true },
"Price" : {"type" : "integer", "store" : true },
"Alcohol" : {"type" : "float", "store" : true },
"Sugar" : {"type" : "float", "store" : true },
"Acid" : {"type" : "float", "store" : true },
"Soldout" : {"type" : "boolean", "store" : true },
"Obsoleteproduct" : {"type" : "boolean", "store" : true },
"Deeplookup" : {"type" : "boolean", "store" : true },
"LookupTimes" : {"type" : "date", "store" : true }
}
}
}'