Skip to content

Package: SchemaKeys

SchemaKeys

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2017, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.elasticsearch.client;
14:
15: /**
16: * Schema keys and values type definition
17: *
18: * @since 1.0.0
19: */
20: public class SchemaKeys {
21:
22: private SchemaKeys() {
23: }
24:
25: /**
26: * Query key
27: *
28: * @since 1.0.0
29: */
30: public static final String KEY_QUERY = "query";
31: /**
32: * Sort key
33: *
34: * @since 1.0.0
35: */
36: public static final String KEY_SORT = "sort";
37: /**
38: * Include fields key
39: *
40: * @since 1.0.0
41: */
42: public static final String KEY_INCLUDES = "includes";
43: /**
44: * Exclude fields key
45: *
46: * @since 1.0.0
47: */
48: public static final String KEY_EXCLUDES = "excludes";
49: /**
50: * From key (used by queries for paginating the result set)
51: *
52: * @since 1.0.0
53: */
54: public static final String KEY_FROM = "from";
55: /**
56: * Size key (used by queries to limit the result set size)
57: *
58: * @since 1.0.0
59: */
60: public static final String KEY_SIZE = "size";
61:
62: /**
63: * Query ascending sort key
64: *
65: * @since 1.0.0
66: */
67: public static final String SORT_ASCENDING_VALUE = "asc";
68: /**
69: * Query descending sort key
70: *
71: * @since 1.0.0
72: */
73: public static final String SORT_DESCENDING_VALUE = "desc";
74: /**
75: * Format key
76: *
77: * @since 1.0.0
78: */
79: public static final String KEY_FORMAT = "format";
80: /**
81: * Index key
82: *
83: * @since 1.0.0
84: */
85: public static final String KEY_INDEX = "index";
86: /**
87: * Settings key
88: *
89: * @since 1.5.0
90: */
91: public static final String KEY_SETTINGS = "settings";
92: /**
93: * Source key
94: *
95: * @since 1.0.0
96: */
97: public static final String KEY_SOURCE = "_source";
98: /**
99: * Type key
100: *
101: * @since 1.0.0
102: */
103: public static final String KEY_TYPE = "type";
104: /**
105: * Enabled key
106: *
107: * @since 1.0.0
108: */
109: public static final String KEY_ENABLED = "enabled";
110: /**
111: * Dynamic key
112: *
113: * @since 1.0.0
114: */
115: public static final String KEY_DYNAMIC = "dynamic";
116: /**
117: * Object binary type
118: *
119: * @since 1.0.0
120: */
121: public static final String TYPE_BINARY = "binary";
122: /**
123: * Object date type
124: *
125: * @since 1.0.0
126: */
127: public static final String TYPE_DATE = "date";
128: /**
129: * Object double type
130: *
131: * @since 1.0.0
132: */
133: public static final String TYPE_DOUBLE = "double";
134: /**
135: * Object geo point type
136: *
137: * @since 1.0.0
138: */
139: public static final String TYPE_GEO_POINT = "geo_point";
140: /**
141: * Object integer type
142: *
143: * @since 1.0.0
144: */
145: public static final String TYPE_INTEGER = "integer";
146: /**
147: * Object ip address type
148: *
149: * @since 1.0.0
150: */
151: public static final String TYPE_IP = "ip";
152: /**
153: * Object object type
154: *
155: * @since 1.0.0
156: */
157: public static final String TYPE_OBJECT = "object";
158: /**
159: * Object string type
160: *
161: * @since 1.0.0
162: */
163: public static final String TYPE_STRING = "string";
164: /**
165: * Object keyword type (Structured string that can be indexed with new ES version)<br>
166: * <b>Please leave the "index" property for the keyword fields to false (default value) otherwise the value will be analyzed and indexed for the search operation)<br>
167: * (see https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html)</b>
168: *
169: * @since 1.0.0
170: */
171: public static final String TYPE_KEYWORD = "keyword";
172:
173: /**
174: * "false" field value
175: *
176: * @since 1.0.0
177: */
178: public static final String VALUE_FALSE = "false";
179: /**
180: * "true" field value
181: *
182: * @since 1.0.0
183: */
184: public static final String VALUE_TRUE = "true";
185:
186: /**
187: * Refresh interval (for schema definition)
188: *
189: * @since 1.0.0
190: */
191: public static final String KEY_REFRESH_INTERVAL = "refresh_interval";
192: /**
193: * Shard number (for schema definition)
194: *
195: * @since 1.0.0
196: */
197: public static final String KEY_SHARD_NUMBER = "number_of_shards";
198: /**
199: * Replica number (for schema definition)
200: *
201: * @since 1.0.0
202: */
203: public static final String KEY_REPLICA_NUMBER = "number_of_replicas";
204:
205: /**
206: * Message field.
207: *
208: * @since 1.0.0
209: */
210: public static final String FIELD_NAME_MESSAGE = "message";
211: /**
212: * Metrics field.
213: *
214: * @since 1.0.0
215: */
216: public static final String FIELD_NAME_METRICS = "metrics";
217: /**
218: * Position field.
219: *
220: * @since 1.0.0
221: */
222: public static final String FIELD_NAME_POSITION = "position";
223: /**
224: * Properties field.
225: *
226: * @since 1.0.0
227: */
228: public static final String FIELD_NAME_PROPERTIES = "properties";
229:
230: }