Skip to content

Commit ac451c3

Browse files
committed
fix: upgrade elastic and kibana containers, elastic queries
1 parent 028cd45 commit ac451c3

File tree

2 files changed

+206
-2
lines changed

2 files changed

+206
-2
lines changed

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.0'
22
services:
33
elasticsearch:
44
container_name: elastic-container
5-
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
5+
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14
66
restart: always
77
environment:
88
- xpack.security.enabled=false
@@ -13,7 +13,7 @@ services:
1313
- '9200:9200'
1414
kibana:
1515
container_name: kibana-container
16-
image: 'docker.elastic.co/kibana/kibana:7.12.0'
16+
image: 'docker.elastic.co/kibana/kibana:7.17.14'
1717
environment:
1818
- 'ELASTICSEARCH_HOSTS=http://elastic-container:9200'
1919
networks:

static/elastic-queries.txt

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,192 @@
11
#get information of each index in the cluster
22
GET _cat/indices
33

4+
#delete index
5+
DELETE /demo-3
6+
7+
#clear cache of an index
8+
POST /demo-3/_cache/clear
9+
410
#see mapping of an index
511
GET /demo-3/_mapping
612

13+
14+
#create index and mapping
15+
PUT /demo-3
16+
{
17+
"settings": {
18+
"index": {
19+
"number_of_shards": 1,
20+
"number_of_replicas": 1
21+
}
22+
},
23+
"mappings": {
24+
"properties": {
25+
"_org": {
26+
"type": "text",
27+
"fields": {
28+
"keyword": {
29+
"type": "keyword",
30+
"ignore_above": 256
31+
}
32+
}
33+
},
34+
"copay": {
35+
"type": "integer"
36+
},
37+
"creationDate": {
38+
"type": "text",
39+
"fields": {
40+
"keyword": {
41+
"type": "keyword",
42+
"ignore_above": 256
43+
}
44+
}
45+
},
46+
"deductible": {
47+
"type": "integer"
48+
},
49+
"linkedPlanServices": {
50+
"properties": {
51+
"_org": {
52+
"type": "text"
53+
},
54+
"objectId": {
55+
"type": "keyword"
56+
},
57+
"objectType": {
58+
"type": "text"
59+
}
60+
}
61+
},
62+
"linkedService": {
63+
"properties": {
64+
"_org": {
65+
"type": "text"
66+
},
67+
"name": {
68+
"type": "text"
69+
},
70+
"objectId": {
71+
"type": "keyword"
72+
},
73+
"objectType": {
74+
"type": "text"
75+
}
76+
}
77+
},
78+
"name": {
79+
"type": "text",
80+
"fields": {
81+
"keyword": {
82+
"type": "keyword",
83+
"ignore_above": 256
84+
}
85+
}
86+
},
87+
"objectId": {
88+
"type": "text",
89+
"fields": {
90+
"keyword": {
91+
"type": "keyword",
92+
"ignore_above": 256
93+
}
94+
}
95+
},
96+
"objectType": {
97+
"type": "text",
98+
"fields": {
99+
"keyword": {
100+
"type": "keyword",
101+
"ignore_above": 256
102+
}
103+
}
104+
},
105+
"plan": {
106+
"properties": {
107+
"_org": {
108+
"type": "text"
109+
},
110+
"creationDate": {
111+
"type": "date",
112+
"format": "MM-dd-yyyy"
113+
},
114+
"objectId": {
115+
"type": "keyword"
116+
},
117+
"objectType": {
118+
"type": "text"
119+
},
120+
"planType": {
121+
"type": "text"
122+
}
123+
}
124+
},
125+
"planCostShares": {
126+
"properties": {
127+
"_org": {
128+
"type": "text"
129+
},
130+
"copay": {
131+
"type": "integer"
132+
},
133+
"deductible": {
134+
"type": "integer"
135+
},
136+
"objectId": {
137+
"type": "keyword"
138+
},
139+
"objectType": {
140+
"type": "text"
141+
}
142+
}
143+
},
144+
"planType": {
145+
"type": "text",
146+
"fields": {
147+
"keyword": {
148+
"type": "keyword",
149+
"ignore_above": 256
150+
}
151+
}
152+
},
153+
"plan_join": {
154+
"type": "join",
155+
"eager_global_ordinals": true,
156+
"relations": {
157+
"linkedPlanServices": [
158+
"linkedService",
159+
"planserviceCostShares"
160+
],
161+
"plan": [
162+
"planCostShares",
163+
"linkedPlanServices"
164+
]
165+
}
166+
},
167+
"planserviceCostShares": {
168+
"properties": {
169+
"_org": {
170+
"type": "text"
171+
},
172+
"copay": {
173+
"type": "integer"
174+
},
175+
"deductible": {
176+
"type": "integer"
177+
},
178+
"objectId": {
179+
"type": "keyword"
180+
},
181+
"objectType": {
182+
"type": "text"
183+
}
184+
}
185+
}
186+
}
187+
}
188+
}
189+
7190
#search for full list of objects
8191
GET /demo-3/_search
9192
{
@@ -133,6 +316,27 @@ GET /demo-3/_search
133316
}
134317
}
135318

319+
# FAILED QUERY
320+
GET /demo-3/_search
321+
{
322+
"query": {
323+
"has_parent": {
324+
"parent_type": "linkedPlanServicess",
325+
"query": {
326+
"bool": {
327+
"must": [
328+
{
329+
"match": {
330+
"objectId": "27283xvx9asdff-512"
331+
}
332+
}
333+
]
334+
}
335+
}
336+
}
337+
}
338+
}
339+
136340
#delete cache index
137341
DELETE /demo-3
138342

0 commit comments

Comments
 (0)