@@ -87,6 +87,30 @@ curl --request POST \
87
87
"sparse_column": {"20":7.7, "80":7.8, "90": 97.9},
88
88
"year": 2018,
89
89
"tensor": [[5.0, 4.2, 4.3, 4.5], [4.0, 4.2, 4.3, 4.4]]
90
+ },
91
+ {
92
+ "num": 5,
93
+
94
+ "vec": [4.0, 4.2, 4.3, 4.5],
95
+ "sparse_column": {"20":7.7, "80":7.8, "90": 97.9},
96
+ "year": 2018,
97
+ "tensor": [[5.0, 4.2, 4.3, 4.5], [4.0, 4.2, 4.3, 4.4]]
98
+ },
99
+ {
100
+ "num": 6,
101
+ "body": "test@hotmailcom",
102
+ "vec": [4.0, 4.2, 4.3, 4.5],
103
+ "sparse_column": {"20":7.7, "80":7.8, "90": 97.9},
104
+ "year": 2018,
105
+ "tensor": [[5.0, 4.2, 4.3, 4.5], [4.0, 4.2, 4.3, 4.4]]
106
+ },
107
+ {
108
+ "num": 7,
109
+ "body": "this is a sentence including a mail address, [email protected] ",
110
+ "vec": [4.0, 4.2, 4.3, 4.5],
111
+ "sparse_column": {"20":7.7, "80":7.8, "90": 97.9},
112
+ "year": 2018,
113
+ "tensor": [[5.0, 4.2, 4.3, 4.5], [4.0, 4.2, 4.3, 4.4]]
90
114
}
91
115
] '
92
116
@@ -134,6 +158,51 @@ curl --request GET \
134
158
"filter": "char_length(body) > 4"
135
159
} '
136
160
161
+ # show rows of 'tbl1' where body inluding 'com'
162
+ echo -e ' \n\n-- show rows of ' tbl1' where body inluding ' \' com\' ' '
163
+ curl --request GET \
164
+ --url http://localhost:23820/databases/default_db/tables/tbl1/docs \
165
+ --header ' accept: application/json' \
166
+ --header ' content-type: application/json' \
167
+ --data '
168
+ {
169
+ "output":
170
+ [
171
+ "body"
172
+ ],
173
+ "filter": "regex(body, ' \' com\' ' )"
174
+ } '
175
+
176
+ # show rows of 'tbl1' where body including a mail address (using regex)
177
+ echo -e ' \n\n-- show rows of ' tbl1' where body including a mail address (using regex)'
178
+ curl --request GET \
179
+ --url http://localhost:23820/databases/default_db/tables/tbl1/docs \
180
+ --header ' accept: application/json' \
181
+ --header ' content-type: application/json' \
182
+ --data '
183
+ {
184
+ "output":
185
+ [
186
+ "body"
187
+ ],
188
+ "filter": "regex(body, ' \' ' (' .' *' ' )' @' (' .' *' ' )' ' \\' ' .' com\' ' )"
189
+ } '
190
+
191
+ # show rows of 'tbl1' where body including a mail address (using regex)
192
+ echo -e ' \n\n-- show rows of ' tbl1' where body including a mail address (using regex)'
193
+ curl --request GET \
194
+ --url http://localhost:23820/databases/default_db/tables/tbl1/docs \
195
+ --header ' accept: application/json' \
196
+ --header ' content-type: application/json' \
197
+ --data '
198
+ {
199
+ "output":
200
+ [
201
+ "body"
202
+ ],
203
+ "filter": "regex(body, ' \' ' (' [0-9A-Za-z_]+' (' [-+.][0-9A-Za-z_]+' )' ' *' ' )' @' (' [0-9A-Za-z_]+' (' [-.][0-9A-Za-z_]+' )' ' *' ' )' ' \\' .' (' [0-9A-Za-z_]+' (' [-.][0-9A-Za-z_]+' )' ' *' ' )' \' ' )"
204
+ } '
205
+
137
206
# drop tbl1
138
207
echo -e ' \n\n-- drop tbl1'
139
208
curl --request DELETE \
0 commit comments