After some offline brainstorming with @Sidneys1, we came up with a couple syntax's for complex querying.
Guided: This will mode will wrap queries within a visual block to show the OR/AND blocks.
Use mongo syntax ($OR, $AND) to start complex sections
I imagine the block looking something like how scratch shows blocks:
Lucene: Elastic uses lucene syntax, and it seems relatively powerful.
# Find requests that contain the number 200, in any field
200
Find 200 in the status field
status:200
Find all status codes between 400-499
status:[400 TO 499]
Find status codes 400-499 with the extension php
status:[400 TO 499] AND extension:PHP
Find status codes 400-499 with the extension php or html
status:[400 TO 499] AND (extension:php OR extension:html)
- Pythonic: Query will look _similiar_ to python code, but with a couple adjustments for simplicity
- Instead of `range(400, 500)` , support expanding lists with an ellipse: `[400..500]`
```py
# Find requests that contain the number 200, in any field
200
# Find 200 in the status field
status is 200
# Find all status codes between 400-499
status in [400..499]
# Find status codes 400-499 with the extension php
status in [400..499] and extension is "PHP"
# Find status codes 400-499 with the extension php or html
status in [400..499] and extension in ["php", "html"]
After some offline brainstorming with @Sidneys1, we came up with a couple syntax's for complex querying.
$OR
,$AND
) to start complex sectionsFind 200 in the status field
status:200
Find all status codes between 400-499
status:[400 TO 499]
Find status codes 400-499 with the extension php
status:[400 TO 499] AND extension:PHP
Find status codes 400-499 with the extension php or html
status:[400 TO 499] AND (extension:php OR extension:html)