python es mapping

添加mapping

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
curl -XPUT "http://localhost:9200/spark/docs/_mapping" -d '
{
"docs" : {
"properties" : {
"agent" : {
"type" : "string",
"index" : "not_analyzed"
},
"dateTime" : {
"type" : "string",
"index" : "not_analyzed"
},
"hit" : {
"type" : "string",
"index" : "not_analyzed"
},
"referer" : {
"type" : "string",
"index" : "not_analyzed"
},
"request" : {
"type" : "string",
"index" : "not_analyzed"
}
}
}
}'