owl-cli 6.153.0 → 6.155.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/owl.js +3 -1
- package/defaultTemplate/api/src/init/indexConfigs/createAliase.json +2 -2
- package/defaultTemplate/api/src/init/indexConfigs/createIndex.json +57 -75
- package/defaultTemplate/api/src/init/indexConfigs/reindex.json +6 -7
- package/defaultTemplate/api/src/init/init.jsx +9 -0
- package/package.json +1 -1
package/bin/owl.js
CHANGED
|
@@ -67,9 +67,11 @@ function mkdir(path) {
|
|
|
67
67
|
function getIndexMapping(flatternedSpecs){
|
|
68
68
|
var allFields = flatternedSpecs.allFields;
|
|
69
69
|
var propMappings = {};
|
|
70
|
+
var stockFields = ["owl_createTime","m","_t","_v","_orgIds","_orgId","del","owl_createUserId","owl_lastModifiedUserId","owl_modifyTime","owl_createTime"];
|
|
70
71
|
for(var i=0; i<allFields.length; i++){
|
|
71
72
|
var field = allFields[i];
|
|
72
|
-
|
|
73
|
+
|
|
74
|
+
if(stockFields.indexOf(field.key)>=0){
|
|
73
75
|
continue;
|
|
74
76
|
}
|
|
75
77
|
if(field.fieldType == 'date'){
|
|
@@ -12,91 +12,73 @@
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
|
|
16
15
|
"mappings": {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
"dynamic": "false",
|
|
17
|
+
"properties": {
|
|
18
|
+
"m": {
|
|
19
|
+
"type": "keyword"
|
|
20
|
+
},
|
|
21
|
+
"_t": {
|
|
22
|
+
"type": "keyword"
|
|
23
|
+
},
|
|
24
|
+
"_v": {
|
|
25
|
+
"type": "integer"
|
|
26
|
+
},
|
|
27
|
+
"_orgIds": {
|
|
28
|
+
"type": "text",
|
|
29
|
+
"fields": {
|
|
30
|
+
"keyword": {
|
|
31
|
+
"type": "keyword",
|
|
32
|
+
"ignore_above": 256
|
|
24
33
|
}
|
|
25
|
-
},{
|
|
26
|
-
"geo_point": {
|
|
27
|
-
"match_mapping_type": "object",
|
|
28
|
-
"match": "*_geo_point",
|
|
29
|
-
"mapping": {
|
|
30
|
-
"type": "geo_point"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
"_v":{
|
|
43
|
-
"type": "integer"
|
|
44
|
-
},
|
|
45
|
-
"_orgIds": {
|
|
46
|
-
"type": "text",
|
|
47
|
-
"fields": {
|
|
48
|
-
"keyword": {
|
|
49
|
-
"type": "keyword",
|
|
50
|
-
"ignore_above": 256
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"_orgId": {
|
|
55
|
-
"type": "text",
|
|
56
|
-
"fields": {
|
|
57
|
-
"keyword": {
|
|
58
|
-
"type": "keyword",
|
|
59
|
-
"ignore_above": 256
|
|
60
|
-
}
|
|
35
|
+
},
|
|
36
|
+
"_orgId": {
|
|
37
|
+
"type": "text",
|
|
38
|
+
"fields": {
|
|
39
|
+
"keyword": {
|
|
40
|
+
"type": "keyword",
|
|
41
|
+
"ignore_above": 256
|
|
61
42
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"del": {
|
|
46
|
+
"type": "text",
|
|
47
|
+
"fields": {
|
|
48
|
+
"keyword": {
|
|
49
|
+
"type": "keyword",
|
|
50
|
+
"ignore_above": 256
|
|
70
51
|
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"owl_createUserId": {
|
|
55
|
+
"type": "text",
|
|
56
|
+
"fields": {
|
|
57
|
+
"keyword": {
|
|
58
|
+
"type": "keyword",
|
|
59
|
+
"ignore_above": 256
|
|
79
60
|
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"owl_lastModifiedUserId": {
|
|
64
|
+
"type": "text",
|
|
65
|
+
"fields": {
|
|
66
|
+
"keyword": {
|
|
67
|
+
"type": "keyword",
|
|
68
|
+
"ignore_above": 256
|
|
88
69
|
}
|
|
89
|
-
},
|
|
90
|
-
"owl_modifyTime": {
|
|
91
|
-
"type": "date"
|
|
92
|
-
},
|
|
93
|
-
"owl_createTime":{
|
|
94
|
-
"type":"date"
|
|
95
70
|
}
|
|
96
|
-
|
|
71
|
+
},
|
|
72
|
+
"owl_modifyTime": {
|
|
73
|
+
"type": "date"
|
|
74
|
+
},
|
|
75
|
+
"owl_createTime": {
|
|
76
|
+
"type": "date"
|
|
97
77
|
}
|
|
78
|
+
@fieldMappings
|
|
79
|
+
}
|
|
98
80
|
},
|
|
99
|
-
"aliases"
|
|
81
|
+
"aliases": {
|
|
100
82
|
"@projectCode": {}
|
|
101
83
|
}
|
|
102
84
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
//curl -u elastic 'localhost:9200/is1erp/_doc/_search' -H 'Content-Type: application/json' -d '
|
|
2
|
+
POST _reindex
|
|
2
3
|
{
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
}
|
|
4
|
+
"source": {
|
|
5
|
+
"index": "@projectCode_v0"
|
|
6
|
+
},
|
|
7
|
+
"dest": {
|
|
8
|
+
"index": "@projectCode_v1"
|
|
10
9
|
}
|
|
11
10
|
}'
|
|
@@ -23,3 +23,12 @@ var s = HttpUtils.putRaw( searchUrl, createIndex, headers);
|
|
|
23
23
|
var result = JSON.parse(s);
|
|
24
24
|
|
|
25
25
|
$.log(s);
|
|
26
|
+
|
|
27
|
+
var indexJson = JSON.parse(createIndex);
|
|
28
|
+
var mappings = indexJson.mappings;
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var changeMappingUrl = elasticSearchUrl+"/" + indexName + "/_mapping";
|
|
32
|
+
var s = HttpUtils.putRaw( changeMappingUrl, JSON.stringify(mappings), headers);
|
|
33
|
+
$.log(s);
|
|
34
|
+
|