simple_in.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. [
  2. {
  3. "query": "user.email:[test@test.com] test:[hello]",
  4. "result": [
  5. {"type": "spaces", "value": ""},
  6. {
  7. "type": "filter",
  8. "filter": "textIn",
  9. "negated": false,
  10. "key": {"type": "keySimple", "value": "user.email", "quoted": false},
  11. "operator": "",
  12. "value": {
  13. "type": "valueTextList",
  14. "items": [
  15. {
  16. "separator": "",
  17. "value": {"type": "valueText", "value": "test@test.com", "quoted": false}
  18. }
  19. ]
  20. }
  21. },
  22. {"type": "spaces", "value": " "},
  23. {
  24. "type": "filter",
  25. "filter": "textIn",
  26. "negated": false,
  27. "key": {"type": "keySimple", "value": "test", "quoted": false},
  28. "operator": "",
  29. "value": {
  30. "type": "valueTextList",
  31. "items": [
  32. {
  33. "separator": "",
  34. "value": {"type": "valueText", "value": "hello", "quoted": false}
  35. }
  36. ]
  37. }
  38. },
  39. {"type": "spaces", "value": ""}
  40. ]
  41. },
  42. {
  43. "query": "user.email:[test@test.com,test2@test.com,test3@test.com] test:[hello]",
  44. "result": [
  45. {"type": "spaces", "value": ""},
  46. {
  47. "type": "filter",
  48. "filter": "textIn",
  49. "negated": false,
  50. "key": {"type": "keySimple", "value": "user.email", "quoted": false},
  51. "operator": "",
  52. "value": {
  53. "type": "valueTextList",
  54. "items": [
  55. {
  56. "separator": "",
  57. "value": {"type": "valueText", "value": "test@test.com", "quoted": false}
  58. },
  59. {
  60. "separator": ",",
  61. "value": {"type": "valueText", "value": "test2@test.com", "quoted": false}
  62. },
  63. {
  64. "separator": ",",
  65. "value": {"type": "valueText", "value": "test3@test.com", "quoted": false}
  66. }
  67. ]
  68. }
  69. },
  70. {"type": "spaces", "value": " "},
  71. {
  72. "type": "filter",
  73. "filter": "textIn",
  74. "negated": false,
  75. "key": {"type": "keySimple", "value": "test", "quoted": false},
  76. "operator": "",
  77. "value": {
  78. "type": "valueTextList",
  79. "items": [
  80. {
  81. "separator": "",
  82. "value": {"type": "valueText", "value": "hello", "quoted": false}
  83. }
  84. ]
  85. }
  86. },
  87. {"type": "spaces", "value": ""}
  88. ]
  89. },
  90. {
  91. "query": "!user.email:[test@test.com, test@test2.com, test@test3.com] test:[hello]",
  92. "result": [
  93. {"type": "spaces", "value": ""},
  94. {
  95. "type": "filter",
  96. "filter": "textIn",
  97. "negated": true,
  98. "key": {"type": "keySimple", "value": "user.email", "quoted": false},
  99. "operator": "",
  100. "value": {
  101. "type": "valueTextList",
  102. "items": [
  103. {
  104. "separator": "",
  105. "value": {"type": "valueText", "value": "test@test.com", "quoted": false}
  106. },
  107. {
  108. "separator": ", ",
  109. "value": {"type": "valueText", "value": "test@test2.com", "quoted": false}
  110. },
  111. {
  112. "separator": ", ",
  113. "value": {"type": "valueText", "value": "test@test3.com", "quoted": false}
  114. }
  115. ]
  116. }
  117. },
  118. {"type": "spaces", "value": " "},
  119. {
  120. "type": "filter",
  121. "filter": "textIn",
  122. "negated": false,
  123. "key": {"type": "keySimple", "value": "test", "quoted": false},
  124. "operator": "",
  125. "value": {
  126. "type": "valueTextList",
  127. "items": [
  128. {
  129. "separator": "",
  130. "value": {"type": "valueText", "value": "hello", "quoted": false}
  131. }
  132. ]
  133. }
  134. },
  135. {"type": "spaces", "value": ""}
  136. ]
  137. },
  138. {
  139. "query": "test:h[e]llo]",
  140. "result": [
  141. {"type": "spaces", "value": ""},
  142. {
  143. "type": "filter",
  144. "filter": "text",
  145. "negated": false,
  146. "key": {"type": "keySimple", "value": "test", "quoted": false},
  147. "operator": "",
  148. "value": {"type": "valueText", "value": "h[e]llo]", "quoted": false}
  149. },
  150. {"type": "spaces", "value": ""}
  151. ]
  152. },
  153. {
  154. "query": "test:[h[e]llo",
  155. "result": [
  156. {"type": "spaces", "value": ""},
  157. {
  158. "type": "filter",
  159. "filter": "text",
  160. "negated": false,
  161. "key": {"type": "keySimple", "value": "test", "quoted": false},
  162. "operator": "",
  163. "value": {"type": "valueText", "value": "[h[e]llo", "quoted": false}
  164. },
  165. {"type": "spaces", "value": ""}
  166. ]
  167. },
  168. {
  169. "query": "test:\"[h]\"",
  170. "result": [
  171. {"type": "spaces", "value": ""},
  172. {
  173. "type": "filter",
  174. "filter": "text",
  175. "negated": false,
  176. "key": {"type": "keySimple", "value": "test", "quoted": false},
  177. "operator": "",
  178. "value": {"type": "valueText", "value": "[h]", "quoted": true}
  179. },
  180. {"type": "spaces", "value": ""}
  181. ]
  182. },
  183. {
  184. "query": "test:[h]*",
  185. "result": [
  186. {"type": "spaces", "value": ""},
  187. {
  188. "type": "filter",
  189. "filter": "text",
  190. "negated": false,
  191. "key": {"type": "keySimple", "value": "test", "quoted": false},
  192. "operator": "",
  193. "value": {"type": "valueText", "value": "[h]*", "quoted": false}
  194. },
  195. {"type": "spaces", "value": ""}
  196. ]
  197. },
  198. {
  199. "query": "test:[h e]",
  200. "result": [
  201. {"type": "spaces", "value": ""},
  202. {
  203. "type": "filter",
  204. "filter": "text",
  205. "negated": false,
  206. "key": {"type": "keySimple", "value": "test", "quoted": false},
  207. "operator": "",
  208. "value": {"type": "valueText", "value": "[h", "quoted": false}
  209. },
  210. {"type": "spaces", "value": " "},
  211. {"type": "freeText", "value": "e]", "quoted": false, "invalid": null},
  212. {"type": "spaces", "value": ""}
  213. ]
  214. },
  215. {
  216. "query": "test:[]",
  217. "result": [
  218. {"type": "spaces", "value": ""},
  219. {
  220. "type": "filter",
  221. "filter": "text",
  222. "negated": false,
  223. "key": {"type": "keySimple", "value": "test", "quoted": false},
  224. "operator": "",
  225. "value": {"type": "valueText", "value": "[]", "quoted": false}
  226. },
  227. {"type": "spaces", "value": ""}
  228. ]
  229. },
  230. {
  231. "query": "user.email:[test@test.com, \"hi\", 1]",
  232. "result": [
  233. {"type": "spaces", "value": ""},
  234. {
  235. "type": "filter",
  236. "filter": "textIn",
  237. "negated": false,
  238. "key": {"type": "keySimple", "value": "user.email", "quoted": false},
  239. "operator": "",
  240. "value": {
  241. "type": "valueTextList",
  242. "items": [
  243. {
  244. "separator": "",
  245. "value": {"type": "valueText", "value": "test@test.com", "quoted": false}
  246. },
  247. {
  248. "separator": ", ",
  249. "value": {"type": "valueText", "value": "hi", "quoted": true}
  250. },
  251. {
  252. "separator": ", ",
  253. "value": {"type": "valueText", "value": "1", "quoted": false}
  254. }
  255. ]
  256. }
  257. },
  258. {"type": "spaces", "value": ""}
  259. ]
  260. },
  261. {
  262. "query": "user.email:[test@test.com, \"hi\", 1.0]",
  263. "result": [
  264. {"type": "spaces", "value": ""},
  265. {
  266. "type": "filter",
  267. "filter": "textIn",
  268. "negated": false,
  269. "key": {"type": "keySimple", "value": "user.email", "quoted": false},
  270. "operator": "",
  271. "value": {
  272. "type": "valueTextList",
  273. "items": [
  274. {
  275. "separator": "",
  276. "value": {"type": "valueText", "value": "test@test.com", "quoted": false}
  277. },
  278. {
  279. "separator": ", ",
  280. "value": {"type": "valueText", "value": "hi", "quoted": true}
  281. },
  282. {
  283. "separator": ", ",
  284. "value": {"type": "valueText", "value": "1.0", "quoted": false}
  285. }
  286. ]
  287. }
  288. },
  289. {"type": "spaces", "value": ""}
  290. ]
  291. },
  292. {
  293. "query": "test:[[h]]",
  294. "result": [
  295. {"type": "spaces", "value": ""},
  296. {
  297. "type": "filter",
  298. "filter": "textIn",
  299. "negated": false,
  300. "key": {"type": "keySimple", "value": "test", "quoted": false},
  301. "operator": "",
  302. "value": {
  303. "type": "valueTextList",
  304. "items": [
  305. {
  306. "separator": "",
  307. "value": {"type": "valueText", "value": "[h]", "quoted": false}
  308. }
  309. ]
  310. }
  311. },
  312. {"type": "spaces", "value": ""}
  313. ]
  314. },
  315. {
  316. "query": "test:[a, [h]]",
  317. "result": [
  318. {"type": "spaces", "value": ""},
  319. {
  320. "type": "filter",
  321. "filter": "textIn",
  322. "negated": false,
  323. "key": {"type": "keySimple", "value": "test", "quoted": false},
  324. "operator": "",
  325. "value": {
  326. "type": "valueTextList",
  327. "items": [
  328. {
  329. "separator": "",
  330. "value": {"type": "valueText", "value": "a", "quoted": false}
  331. },
  332. {
  333. "separator": ", ",
  334. "value": {"type": "valueText", "value": "[h]", "quoted": false}
  335. }
  336. ]
  337. }
  338. },
  339. {"type": "spaces", "value": ""}
  340. ]
  341. },
  342. {
  343. "query": "user.email:[test@test.com]user.email:hello@hello.com",
  344. "result": [
  345. {"type": "spaces", "value": ""},
  346. {
  347. "type": "filter",
  348. "filter": "text",
  349. "negated": false,
  350. "key": {"type": "keySimple", "value": "user.email", "quoted": false},
  351. "operator": "",
  352. "value": {
  353. "type": "valueText",
  354. "value": "[test@test.com]user.email:hello@hello.com",
  355. "quoted": false
  356. }
  357. },
  358. {"type": "spaces", "value": ""}
  359. ]
  360. },
  361. {
  362. "query": "user.email:[test@test.com, ]",
  363. "result": [
  364. {"type": "spaces", "value": ""},
  365. {
  366. "type": "filter",
  367. "filter": "textIn",
  368. "invalid": {
  369. "type": "empty-value-in-list-not-allowed",
  370. "reason": "Lists should not have empty values"
  371. },
  372. "negated": false,
  373. "key": {"type": "keySimple", "value": "user.email", "quoted": false},
  374. "operator": "",
  375. "value": {
  376. "type": "valueTextList",
  377. "items": [
  378. {
  379. "separator": "",
  380. "value": {"type": "valueText", "value": "test@test.com", "quoted": false}
  381. },
  382. {
  383. "separator": ", ",
  384. "value": null
  385. }
  386. ]
  387. }
  388. },
  389. {"type": "spaces", "value": ""}
  390. ]
  391. }
  392. ]