Skip to content

Instantly share code, notes, and snippets.

@evanpurkhiser
Created June 15, 2021 22:09
Show Gist options
  • Save evanpurkhiser/511d3c56327f334e572fa26e065d0f8e to your computer and use it in GitHub Desktop.
Save evanpurkhiser/511d3c56327f334e572fa26e065d0f8e to your computer and use it in GitHub Desktop.
- name: simple
cases:
- desc: test with raw search query at the end
query: user.email:[email protected] release:1.2.1 hello
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueText
value: [email protected]
quoted: false
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: 1.2.1
quoted: false
- type: spaces
value: ' '
- type: freeText
value: hello
quoted: false
- type: spaces
value: ''
- query: hello user.email:[email protected] release:1.2.1
result:
- type: freeText
value: 'hello '
quoted: false
- type: spaces
value: ''
- type: filter
filter: text
negated: false
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueText
value: [email protected]
quoted: false
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: 1.2.1
quoted: false
- type: spaces
value: ''
- name: simple_in
cases:
- query: user.email:[[email protected]] test:[hello]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: [email protected]
quoted: false
- type: spaces
value: ' '
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: hello
quoted: false
- type: spaces
value: ''
- query: user.email:[[email protected],[email protected],[email protected]] test:[hello]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: [email protected]
quoted: false
- separator: ','
value:
type: valueText
value: [email protected]
quoted: false
- separator: ','
value:
type: valueText
value: [email protected]
quoted: false
- type: spaces
value: ' '
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: hello
quoted: false
- type: spaces
value: ''
- query: >-
!user.email:[[email protected], [email protected], [email protected]]
test:[hello]
result:
- type: filter
filter: textIn
negated: true
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: [email protected]
quoted: false
- separator: ', '
value:
type: valueText
value: [email protected]
quoted: false
- separator: ', '
value:
type: valueText
value: [email protected]
quoted: false
- type: spaces
value: ' '
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: hello
quoted: false
- type: spaces
value: ''
- query: test:h[e]llo]
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueText
value: h[e]llo]
quoted: false
- type: spaces
value: ''
- query: test:[h[e]llo
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueText
value: '[h[e]llo'
quoted: false
- type: spaces
value: ''
- query: test:"[h]"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueText
value: '[h]'
quoted: true
- type: spaces
value: ''
- query: test:[h]*
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueText
value: '[h]*'
quoted: false
- type: spaces
value: ''
- query: test:[h e]
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueText
value: '[h'
quoted: false
- type: spaces
value: ' '
- type: freeText
value: e]
quoted: false
- type: spaces
value: ''
- query: test:[]
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueText
value: '[]'
quoted: false
- type: spaces
value: ''
- query: user.email:[[email protected], "hi", 1]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: [email protected]
quoted: false
- separator: ', '
value:
type: valueText
value: hi
quoted: true
- separator: ', '
value:
type: valueText
value: '1'
quoted: false
- type: spaces
value: ''
- query: user.email:[[email protected], "hi", 1.0]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: [email protected]
quoted: false
- separator: ', '
value:
type: valueText
value: hi
quoted: true
- separator: ', '
value:
type: valueText
value: '1.0'
quoted: false
- type: spaces
value: ''
- query: test:[[h]]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: '[h]'
quoted: false
- type: spaces
value: ''
- query: test:[a, [h]]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: test
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: a
quoted: false
- separator: ', '
value:
type: valueText
value: '[h]'
quoted: false
- type: spaces
value: ''
- query: user.email:[[email protected]]user.email:[email protected]
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueText
value: '[[email protected]]user.email:[email protected]'
quoted: false
- type: spaces
value: ''
- name: free_text_search_anywhere
cases:
- query: hello what user.email:[email protected] where release:1.2.1 when
result:
- type: freeText
value: 'hello what '
quoted: false
- type: spaces
value: ''
- type: filter
filter: text
negated: false
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueText
value: [email protected]
quoted: false
- type: spaces
value: ' '
- type: freeText
value: 'where '
quoted: false
- type: spaces
value: ''
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: 1.2.1
quoted: false
- type: spaces
value: ' '
- type: freeText
value: when
quoted: false
- type: spaces
value: ''
- query: hello
result:
- type: freeText
value: hello
quoted: false
- type: spaces
value: ''
- query: ' hello '
result:
- type: freeText
value: 'hello '
quoted: false
- type: spaces
value: ''
- query: ' hello there'
result:
- type: freeText
value: hello there
quoted: false
- type: spaces
value: ''
- query: ' hello there:bye'
result:
- type: freeText
value: 'hello '
quoted: false
- type: spaces
value: ''
- type: filter
filter: text
negated: false
key:
type: keySimple
value: there
quoted: false
operator: ''
value:
type: valueText
value: bye
quoted: false
- type: spaces
value: ''
- name: quoted_free_text_search_anywhere
cases:
- query: '"hello there" user.email:[email protected] "general kenobi"'
result:
- type: freeText
value: hello there
quoted: true
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: user.email
quoted: false
operator: ''
value:
type: valueText
value: [email protected]
quoted: false
- type: spaces
value: ' '
- type: freeText
value: general kenobi
quoted: true
- type: spaces
value: ''
- query: ' " hello " '
result:
- type: freeText
value: ' hello '
quoted: true
- type: spaces
value: ' '
- query: ' " he\"llo " '
result:
- type: freeText
value: ' he\"llo '
quoted: true
- type: spaces
value: ' '
- name: empty_spaces_stripped_correctly
cases:
- query: >-
event.type:transaction
transaction:/organizations/:orgId/discover/results/
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: event.type
quoted: false
operator: ''
value:
type: valueText
value: transaction
quoted: false
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: transaction
quoted: false
operator: ''
value:
type: valueText
value: /organizations/:orgId/discover/results/
quoted: false
- type: spaces
value: ''
- name: timestamp
cases:
- desc: test date format
query: timestamp:>2015-05-18
result:
- type: filter
filter: date
negated: false
key:
type: keySimple
value: timestamp
quoted: false
operator: '>'
value:
type: valueIso8601Date
value: '2015-05-18T00:00:00.000Z'
- type: spaces
value: ''
- desc: test date time format
query: timestamp:>2015-05-18T10:15:01
result:
- type: filter
filter: date
negated: false
key:
type: keySimple
value: timestamp
quoted: false
operator: '>'
value:
type: valueIso8601Date
value: '2015-05-18T10:15:01.000Z'
- type: spaces
value: ''
- desc: test date time format w microseconds
query: timestamp:>2015-05-18T10:15:01.103
result:
- type: filter
filter: date
negated: false
key:
type: keySimple
value: timestamp
quoted: false
operator: '>'
value:
type: valueIso8601Date
value: '2015-05-18T10:15:01.103Z'
- type: spaces
value: ''
- desc: test date time format w microseconds and utc marker
query: timestamp:>2015-05-18T10:15:01.103Z
result:
- type: filter
filter: date
negated: false
key:
type: keySimple
value: timestamp
quoted: false
operator: '>'
value:
type: valueIso8601Date
value: '2015-05-18T10:15:01.103Z'
- type: spaces
value: ''
- name: other_dates
cases:
- desc: test date format with other name
query: first_seen:>2015-05-18
result:
- type: filter
filter: date
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: '>'
value:
type: valueIso8601Date
value: '2015-05-18T00:00:00.000Z'
- type: spaces
value: ''
- query: first_seen:>2018-01-01T05:06:07+00:00
result:
- type: filter
filter: date
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: '>'
value:
type: valueIso8601Date
value: '2018-01-01T05:06:07.000Z'
- type: spaces
value: ''
- query: random:>2015-05-18
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: '>2015-05-18'
quoted: false
- type: spaces
value: ''
- name: rel_time_filter
cases:
- query: first_seen:+7d
result:
- type: filter
filter: relativeDate
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: ''
value:
type: valueRelativeDate
value: 7
sign: +
unit: d
- type: spaces
value: ''
- query: first_seen:-2w
result:
- type: filter
filter: relativeDate
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: ''
value:
type: valueRelativeDate
value: 2
sign: '-'
unit: w
- type: spaces
value: ''
- query: random:-2w
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: '-2w'
quoted: false
- type: spaces
value: ''
- name: invalid_date_formats
cases:
- query: first_seen:hello
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: ''
value:
type: valueText
value: hello
quoted: false
- type: spaces
value: ''
- query: first_seen:123
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: ''
value:
type: valueText
value: '123'
quoted: false
- type: spaces
value: ''
- query: first_seen:2018-01-01T00:01ZZ
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: ''
value:
type: valueText
value: 2018-01-01T00:01ZZ
quoted: false
- type: spaces
value: ''
- name: specific_time_filter
cases:
- query: first_seen:2018-01-01
result:
- type: filter
filter: specificDate
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: ''
value:
type: valueIso8601Date
value: '2018-01-01T00:00:00.000Z'
- type: spaces
value: ''
- query: first_seen:2018-01-01T05:06:07Z
result:
- type: filter
filter: specificDate
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: ''
value:
type: valueIso8601Date
value: '2018-01-01T05:06:07.000Z'
- type: spaces
value: ''
- query: first_seen:2018-01-01T05:06:07+00:00
result:
- type: filter
filter: specificDate
negated: false
key:
type: keySimple
value: first_seen
quoted: false
operator: ''
value:
type: valueIso8601Date
value: '2018-01-01T05:06:07.000Z'
- type: spaces
value: ''
- query: random:2018-01-01T05:06:07
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: '2018-01-01T05:06:07'
quoted: false
- type: spaces
value: ''
- name: timestamp_rollup
cases:
- query: timestamp.to_hour:2018-01-01T05:06:07+00:00
result:
- type: filter
filter: specificDate
negated: false
key:
type: keySimple
value: timestamp.to_hour
quoted: false
operator: ''
value:
type: valueIso8601Date
value: '2018-01-01T05:06:07.000Z'
- type: spaces
value: ''
- name: quoted_val
cases:
- query: release:"a release"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: a release
quoted: true
- type: spaces
value: ''
- query: '!release:"a release"'
result:
- type: filter
filter: text
negated: true
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: a release
quoted: true
- type: spaces
value: ''
- query: release:["a release"]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: a release
quoted: true
- type: spaces
value: ''
- query: release:["a release","b release"]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: a release
quoted: true
- separator: ','
value:
type: valueText
value: b release
quoted: true
- type: spaces
value: ''
- query: release:["a release", "b release", "c release"]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: a release
quoted: true
- separator: ', '
value:
type: valueText
value: b release
quoted: true
- separator: ', '
value:
type: valueText
value: c release
quoted: true
- type: spaces
value: ''
- query: '!release:["a release","b release"]'
result:
- type: filter
filter: textIn
negated: true
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: a release
quoted: true
- separator: ','
value:
type: valueText
value: b release
quoted: true
- type: spaces
value: ''
- query: release:["a release"] hello:["123"]
result:
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: a release
quoted: true
- type: spaces
value: ' '
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: hello
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: '123'
quoted: true
- type: spaces
value: ''
- name: quoted_key
cases:
- query: '"hi:there":value'
result:
- filter: text
negated: false
key:
quoted: true
type: keySimple
value: hi:there
operator: ''
type: filter
value:
quoted: false
type: valueText
value: value
- type: spaces
value: ''
- query: '!"hi:there":value'
result:
- filter: text
negated: true
key:
quoted: true
type: keySimple
value: hi:there
operator: ''
type: filter
value:
quoted: false
type: valueText
value: value
- type: spaces
value: ''
- name: newline_within_quote
cases:
- query: |-
release:"a
release"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: |-
a
release
quoted: true
- type: spaces
value: ''
- name: newline_outside_quote
cases:
- query: |-
release:a
release
raisesError: true
result: []
- name: tab_within_quote
cases:
- query: "release:\"a\trelease\""
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: "a\trelease"
quoted: true
- type: spaces
value: ''
- name: tab_outside_quote
cases:
- desc: tab outside quote
query: "release:a\trelease"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: a
quoted: false
- type: spaces
value: ''
- quoted: false
type: freeText
value: "\trelease"
- type: spaces
value: ''
- name: escaped_quotes
cases:
- query: release:"a\"thing\""
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: a\"thing\"
quoted: true
- type: spaces
value: ''
- query: release:"a\"\"release"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: a\"\"release
quoted: true
- type: spaces
value: ''
- name: multiple_quotes
cases:
- query: device.family:"" browser.name:"Chrome"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: device.family
quoted: false
operator: ''
value:
type: valueText
value: ''
quoted: true
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: browser.name
quoted: false
operator: ''
value:
type: valueText
value: Chrome
quoted: true
- type: spaces
value: ''
- query: device.family:"\"" browser.name:"Chrome"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: device.family
quoted: false
operator: ''
value:
type: valueText
value: \"
quoted: true
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: browser.name
quoted: false
operator: ''
value:
type: valueText
value: Chrome
quoted: true
- type: spaces
value: ''
- name: sooo_many_quotes
cases:
- query: device.family:"\"\"\"\"\"\"\"\"\"\""
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: device.family
quoted: false
operator: ''
value:
type: valueText
value: \"\"\"\"\"\"\"\"\"\"
quoted: true
- type: spaces
value: ''
- name: empty_filter_value
cases:
- query: device.family:""
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: device.family
quoted: false
operator: ''
value:
type: valueText
value: ''
quoted: true
- type: spaces
value: ''
- query: 'device.family:'
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: device.family
quoted: false
operator: ''
value:
type: valueText
value: ''
quoted: false
- type: spaces
value: ''
- name: escaped_quote_value
cases:
- query: device.family:\"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: device.family
quoted: false
operator: ''
value:
type: valueText
value: \"
quoted: false
- type: spaces
value: ''
- query: device.family:te\"st
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: device.family
quoted: false
operator: ''
value:
type: valueText
value: te\"st
quoted: false
- type: spaces
value: ''
- desc: >-
This is a weird case. I think this should be an error, but it doesn't
seem trivial to rewrite the grammar to handle that.
query: url:"te"st
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: url
quoted: false
operator: ''
value:
type: valueText
value: te
quoted: true
- type: spaces
value: ''
- type: freeText
value: st
quoted: false
- type: spaces
value: ''
- name: trailing_quote_value
cases:
- query: device.family:"test
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: device.family
quoted: false
operator: ''
value:
type: valueText
value: '"test'
quoted: false
- type: spaces
value: ''
- query: url:test"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: url
quoted: false
operator: ''
value:
type: valueText
value: test"
quoted: false
- type: spaces
value: ''
- query: url:"test transaction:abadcafe
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: url
quoted: false
operator: ''
value:
type: valueText
value: '"test'
quoted: false
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: transaction
quoted: false
operator: ''
value:
type: valueText
value: abadcafe
quoted: false
- type: spaces
value: ''
- query: url:te"st transaction:abadcafe
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: url
quoted: false
operator: ''
value:
type: valueText
value: te"st
quoted: false
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: transaction
quoted: false
operator: ''
value:
type: valueText
value: abadcafe
quoted: false
- type: spaces
value: ''
- name: custom_tag
cases:
- query: fruit:apple release:1.2.1
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: fruit
quoted: false
operator: ''
value:
type: valueText
value: apple
quoted: false
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: 1.2.1
quoted: false
- type: spaces
value: ''
- name: custom_explicit_tag
cases:
- query: tags[fruit]:apple release:1.2.1 tags[project_id]:123
result:
- type: filter
filter: text
negated: false
key:
type: keyExplicitTag
prefix: tags
key:
type: keySimple
value: fruit
quoted: false
operator: ''
value:
type: valueText
value: apple
quoted: false
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keySimple
value: release
quoted: false
operator: ''
value:
type: valueText
value: 1.2.1
quoted: false
- type: spaces
value: ' '
- type: filter
filter: text
negated: false
key:
type: keyExplicitTag
prefix: tags
key:
type: keySimple
value: project_id
quoted: false
operator: ''
value:
type: valueText
value: '123'
quoted: false
- type: spaces
value: ''
- name: explicit_tags_in_filter
cases:
- query: tags[fruit]:[apple, pear]
result:
- type: filter
filter: textIn
negated: false
key:
type: keyExplicitTag
prefix: tags
key:
type: keySimple
value: fruit
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: apple
quoted: false
- separator: ', '
value:
type: valueText
value: pear
quoted: false
- type: spaces
value: ''
- query: tags[fruit]:["apple wow", "pear"]
result:
- type: filter
filter: textIn
negated: false
key:
type: keyExplicitTag
prefix: tags
key:
type: keySimple
value: fruit
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: apple wow
quoted: true
- separator: ', '
value:
type: valueText
value: pear
quoted: true
- type: spaces
value: ''
- name: has_tag
cases:
- desc: unquoted key
query: has:release
result:
- type: filter
filter: has
negated: false
key:
type: keySimple
value: has
quoted: false
operator: ''
value:
type: keySimple
value: release
quoted: false
- type: spaces
value: ''
- desc: quoted key
query: has:"hi:there"
result:
- type: filter
filter: has
negated: false
key:
type: keySimple
value: has
quoted: false
operator: ''
value:
type: keySimple
value: hi:there
quoted: true
- type: spaces
value: ''
- desc: malformed key
query: has:"hi there"
result:
- type: filter
filter: has
negated: false
key:
type: keySimple
value: has
quoted: false
operator: ''
value:
type: valueText
value: hi there
quoted: true
- type: spaces
value: ''
- name: not_has_tag
cases:
- desc: unquoted key
query: '!has:release'
result:
- type: filter
filter: has
negated: true
key:
type: keySimple
value: has
quoted: false
operator: ''
value:
type: keySimple
value: release
quoted: false
- type: spaces
value: ''
- desc: quoted key
query: '!has:"hi:there"'
result:
- type: filter
filter: has
negated: true
key:
type: keySimple
value: has
quoted: false
operator: ''
value:
type: keySimple
value: hi:there
quoted: true
- type: spaces
value: ''
- name: is_query_unsupported
cases:
- query: is:unassigned
result:
- type: filter
filter: is
negated: false
key:
type: keySimple
value: is
quoted: false
operator: ''
value:
type: valueText
value: unassigned
quoted: false
- type: spaces
value: ''
- name: boolean_filter
cases:
- query: stack.in_app:true
result:
- type: filter
filter: boolean
negated: false
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueBoolean
value: true
- type: spaces
value: ''
- query: stack.in_app:TRUE
result:
- type: filter
filter: boolean
negated: false
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueBoolean
value: true
- type: spaces
value: ''
- query: stack.in_app:1
result:
- type: filter
filter: boolean
negated: false
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueBoolean
value: true
- type: spaces
value: ''
- query: stack.in_app:false
result:
- type: filter
filter: boolean
negated: false
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueBoolean
value: false
- type: spaces
value: ''
- query: stack.in_app:FALSE
result:
- type: filter
filter: boolean
negated: false
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueBoolean
value: false
- type: spaces
value: ''
- query: stack.in_app:0
result:
- type: filter
filter: boolean
negated: false
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueBoolean
value: false
- type: spaces
value: ''
- query: '!stack.in_app:false'
result:
- type: filter
filter: boolean
negated: true
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueBoolean
value: false
- type: spaces
value: ''
- name: invalid_boolean_filter
cases:
- query: stack.in_app:lol
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueText
value: lol
quoted: false
- type: spaces
value: ''
- query: stack.in_app:123
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueText
value: '123'
quoted: false
- type: spaces
value: ''
- query: stack.in_app:>true
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: stack.in_app
quoted: false
operator: ''
value:
type: valueText
value: '>true'
quoted: false
- type: spaces
value: ''
- name: boolean_filter_passthrough
cases:
- query: project_id:1
result:
- type: filter
filter: numeric
negated: false
key:
type: keySimple
value: project_id
quoted: false
operator: ''
value:
type: valueNumber
value: '1'
rawValue: 1
unit: null
- type: spaces
value: ''
- name: numeric_filter
cases:
- desc: Numeric format should still return a string if field isn't allowed
query: random_field:>500
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random_field
quoted: false
operator: ''
value:
type: valueText
value: '>500'
quoted: false
- type: spaces
value: ''
- query: project_id:-500
result:
- type: filter
filter: numeric
negated: false
key:
type: keySimple
value: project_id
quoted: false
operator: ''
value:
type: valueNumber
value: '-500'
rawValue: -500
unit: null
- type: spaces
value: ''
- name: numeric_in_filter
cases:
- query: project_id:[500,501,502]
result:
- type: filter
filter: numericIn
negated: false
key:
type: keySimple
value: project_id
quoted: false
operator: ''
value:
type: valueNumberList
items:
- separator: ''
value:
type: valueNumber
value: '500'
rawValue: 500
unit: null
- separator: ','
value:
type: valueNumber
value: '501'
rawValue: 501
unit: null
- separator: ','
value:
type: valueNumber
value: '502'
rawValue: 502
unit: null
- type: spaces
value: ''
- query: project_id:[500, 501, 502]
result:
- type: filter
filter: numericIn
negated: false
key:
type: keySimple
value: project_id
quoted: false
operator: ''
value:
type: valueNumberList
items:
- separator: ''
value:
type: valueNumber
value: '500'
rawValue: 500
unit: null
- separator: ', '
value:
type: valueNumber
value: '501'
rawValue: 501
unit: null
- separator: ', '
value:
type: valueNumber
value: '502'
rawValue: 502
unit: null
- type: spaces
value: ''
- query: project_id:[500, 501 ,502]
result:
- type: filter
filter: numericIn
negated: false
key:
type: keySimple
value: project_id
quoted: false
operator: ''
value:
type: valueNumberList
items:
- separator: ''
value:
type: valueNumber
value: '500'
rawValue: 500
unit: null
- separator: ', '
value:
type: valueNumber
value: '501'
rawValue: 501
unit: null
- separator: ' ,'
value:
type: valueNumber
value: '502'
rawValue: 502
unit: null
- type: spaces
value: ''
- query: project_id:[500,501,502] issue.id:[100]
result:
- type: filter
filter: numericIn
negated: false
key:
type: keySimple
value: project_id
quoted: false
operator: ''
value:
type: valueNumberList
items:
- separator: ''
value:
type: valueNumber
value: '500'
rawValue: 500
unit: null
- separator: ','
value:
type: valueNumber
value: '501'
rawValue: 501
unit: null
- separator: ','
value:
type: valueNumber
value: '502'
rawValue: 502
unit: null
- type: spaces
value: ' '
- type: filter
filter: numericIn
negated: false
key:
type: keySimple
value: issue.id
quoted: false
operator: ''
value:
type: valueNumberList
items:
- separator: ''
value:
type: valueNumber
value: '100'
rawValue: 100
unit: null
- type: spaces
value: ''
- desc: Numeric format should still return a string if field isn't allowed
query: project_id:[500,501,502] random_field:[500,501,502]
result:
- type: filter
filter: numericIn
negated: false
key:
type: keySimple
value: project_id
quoted: false
operator: ''
value:
type: valueNumberList
items:
- separator: ''
value:
type: valueNumber
value: '500'
rawValue: 500
unit: null
- separator: ','
value:
type: valueNumber
value: '501'
rawValue: 501
unit: null
- separator: ','
value:
type: valueNumber
value: '502'
rawValue: 502
unit: null
- type: spaces
value: ' '
- type: filter
filter: textIn
negated: false
key:
type: keySimple
value: random_field
quoted: false
operator: ''
value:
type: valueTextList
items:
- separator: ''
value:
type: valueText
value: '500'
quoted: false
- separator: ','
value:
type: valueText
value: '501'
quoted: false
- separator: ','
value:
type: valueText
value: '502'
quoted: false
- type: spaces
value: ''
- name: numeric_filter_with_decimals
cases:
- query: transaction.duration:>3.1415
result:
- type: filter
filter: numeric
negated: false
key:
type: keySimple
value: transaction.duration
quoted: false
operator: '>'
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- name: numeric_filter_with_shorthand
cases:
- query: stack.colno:>3k
result:
- type: filter
filter: numeric
negated: false
key:
type: keySimple
value: stack.colno
quoted: false
operator: '>'
value:
type: valueNumber
value: '3'
rawValue: 3000
unit: k
- type: spaces
value: ''
- query: stack.colno:>3m
result:
- type: filter
filter: numeric
negated: false
key:
type: keySimple
value: stack.colno
quoted: false
operator: '>'
value:
type: valueNumber
value: '3'
rawValue: 3000000
unit: m
- type: spaces
value: ''
- query: stack.colno:>3b
result:
- type: filter
filter: numeric
negated: false
key:
type: keySimple
value: stack.colno
quoted: false
operator: '>'
value:
type: valueNumber
value: '3'
rawValue: 3000000000
unit: b
- type: spaces
value: ''
- name: invalid_numeric_fields
cases:
- query: project.id:one
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: project.id
quoted: false
operator: ''
value:
type: valueText
value: one
quoted: false
- type: spaces
value: ''
- query: issue.id:two
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: issue.id
quoted: false
operator: ''
value:
type: valueText
value: two
quoted: false
- type: spaces
value: ''
- query: transaction.duration:>hotdog
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: transaction.duration
quoted: false
operator: ''
value:
type: valueText
value: '>hotdog'
quoted: false
- type: spaces
value: ''
- name: invalid_numeric_shorthand
cases:
- query: stack.colno:>3s
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: stack.colno
quoted: false
operator: ''
value:
type: valueText
value: '>3s'
quoted: false
- type: spaces
value: ''
- name: negated_on_boolean_values_and_non_boolean_field
cases:
- query: '!user.id:true'
result:
- type: filter
filter: text
negated: true
key:
type: keySimple
value: user.id
quoted: false
operator: ''
value:
type: valueText
value: 'true'
quoted: false
- type: spaces
value: ''
- query: '!user.id:1'
result:
- type: filter
filter: text
negated: true
key:
type: keySimple
value: user.id
quoted: false
operator: ''
value:
type: valueText
value: '1'
quoted: false
- type: spaces
value: ''
- name: duration_on_non_duration_field
cases:
- query: user.id:500s
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: user.id
quoted: false
operator: ''
value:
type: valueText
value: 500s
quoted: false
- type: spaces
value: ''
- name: negated_duration_on_non_duration_field
cases:
- query: '!user.id:500s'
result:
- type: filter
filter: text
negated: true
key:
type: keySimple
value: user.id
quoted: false
operator: ''
value:
type: valueText
value: 500s
quoted: false
- type: spaces
value: ''
- name: duration_filter
cases:
- query: transaction.duration:>500s
result:
- type: filter
filter: duration
negated: false
key:
type: keySimple
value: transaction.duration
quoted: false
operator: '>'
value:
type: valueDuration
value: 500
unit: s
- type: spaces
value: ''
- name: duration_filter_overrides_numeric_shorthand
cases:
- desc: 2m should mean 2 minutes for duration filters (as opposed to 2 million)
query: transaction.duration:>2m
result:
- type: filter
filter: duration
negated: false
key:
type: keySimple
value: transaction.duration
quoted: false
operator: '>'
value:
type: valueDuration
value: 2
unit: m
- type: spaces
value: ''
- name: aggregate_duration_filter
cases:
- query: avg(transaction.duration):>500s
result:
- type: filter
filter: aggregateDuration
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: avg
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: transaction.duration
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: '>'
value:
type: valueDuration
value: 500
unit: s
- type: spaces
value: ''
- name: aggregate_duration_filter_overrides_numeric_shorthand
cases:
- desc: 2m should mean 2 minutes for duration filters (as opposed to 2 million)
query: avg(transaction.duration):>2m
result:
- type: filter
filter: aggregateDuration
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: avg
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: transaction.duration
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: '>'
value:
type: valueDuration
value: 2
unit: m
- type: spaces
value: ''
- name: invalid_duration_filter
cases:
- query: transaction.duration:>..500s
result:
- filter: text
key:
quoted: false
type: keySimple
value: transaction.duration
negated: false
operator: ''
type: filter
value:
quoted: false
type: valueText
value: '>..500s'
- type: spaces
value: ''
- name: semver
cases:
- query: sentry.semver:>1.2.3
result:
- filter: text
key:
quoted: false
type: keySimple
value: sentry.semver
negated: false
operator: '>'
type: filter
value:
quoted: false
type: valueText
value: 1.2.3
- type: spaces
value: ''
- query: sentry.semver:>1.2.3-hi
result:
- type: filter
filter: text
key:
quoted: false
type: keySimple
value: sentry.semver
negated: false
operator: '>'
value:
quoted: false
type: valueText
value: 1.2.3-hi
- type: spaces
value: ''
- query: sentry.semver:>=1.2.3-hi
result:
- type: filter
filter: text
key:
quoted: false
type: keySimple
value: sentry.semver
negated: false
operator: '>='
value:
quoted: false
type: valueText
value: 1.2.3-hi
- type: spaces
value: ''
- query: sentry.semver:1.2.3-hi
result:
- type: filter
filter: text
key:
quoted: false
type: keySimple
value: sentry.semver
negated: false
operator: ''
value:
quoted: false
type: valueText
value: 1.2.3-hi
- type: spaces
value: ''
- name: invalid_aggregate_duration_filter
cases:
- query: avg(transaction.duration):>..500s
result:
- type: freeText
value: avg(transaction.duration):>..500s
quoted: false
- type: spaces
value: ''
- name: invalid_aggregate_percentage_filter
cases:
- query: percentage(transaction.duration, transaction.duration):>..500%
result:
- type: freeText
value: percentage(transaction.duration, transaction.duration):>..500%
quoted: false
- type: spaces
value: ''
- name: invalid_aggregate_column_with_duration_filter
cases:
- query: avg(stack.colno):>500s
result:
- type: freeText
quoted: false
value: avg(stack.colno):>500s
- type: spaces
value: ''
- name: numeric_measurements_filter
cases:
- query: measurements.size:3.1415
result:
- type: filter
filter: numeric
negated: false
key:
type: keySimple
value: measurements.size
quoted: false
operator: ''
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- query: measurements.size:>3.1415
result:
- type: filter
filter: numeric
negated: false
key:
type: keySimple
value: measurements.size
quoted: false
operator: '>'
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- query: measurements.size:<3.1415
result:
- type: filter
filter: numeric
negated: false
key:
type: keySimple
value: measurements.size
quoted: false
operator: <
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- name: numeric_aggregate_measurements_filter
cases:
- query: min(measurements.size):3.1415
result:
- type: filter
filter: aggregateNumeric
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: measurements.size
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: ''
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- query: min(measurements.size):>3.1415
result:
- type: filter
filter: aggregateNumeric
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: measurements.size
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: '>'
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- query: min(measurements.size):<3.1415
result:
- type: filter
filter: aggregateNumeric
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: measurements.size
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: <
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- query: min(measurements.size):<3k
result:
- type: filter
filter: aggregateNumeric
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: measurements.size
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: <
value:
type: valueNumber
value: '3'
rawValue: 3000
unit: k
- type: spaces
value: ''
- query: min(measurements.size):2m
result:
- type: filter
filter: aggregateNumeric
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: measurements.size
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: ''
value:
type: valueNumber
value: '2'
rawValue: 2000000
unit: m
- type: spaces
value: ''
- name: numeric_aggregate_op_breakdowns_filter
cases:
- query: min(spans.browser):3.1415
result:
- type: filter
filter: aggregateNumeric
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: spans.browser
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: ''
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- query: min(spans.browser):>3.1415
result:
- type: filter
filter: aggregateNumeric
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: spans.browser
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: '>'
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- query: min(spans.browser):<3.1415
result:
- type: filter
filter: aggregateNumeric
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: spans.browser
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: <
value:
type: valueNumber
value: '3.1415'
rawValue: 3.1415
unit: null
- type: spaces
value: ''
- query: min(spans.browser):<3k
result:
- type: filter
filter: aggregateNumeric
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: spans.browser
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: <
value:
type: valueNumber
value: '3'
rawValue: 3000
unit: k
- type: spaces
value: ''
- query: min(spans.browser):2m
desc: >-
XXX: Questionable if this should actually be parsed as a duration? This
is how it was written when moved from the original python test
result:
- type: filter
filter: aggregateDuration
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: min
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: spans.browser
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: ''
value:
type: valueDuration
value: 2
unit: m
- type: spaces
value: ''
- name: invalid_numeric_aggregate_filter
cases:
- query: min(measurements.size):3s
result:
- type: freeText
quoted: false
value: min(measurements.size):3s
- type: spaces
value: ''
- name: duration_measurements_filter
cases:
- query: measurements.fp:1.5s
result:
- type: filter
filter: duration
negated: false
key:
type: keySimple
value: measurements.fp
quoted: false
operator: ''
value:
type: valueDuration
value: 1.5
unit: s
- type: spaces
value: ''
- query: measurements.fp:>1.5s
result:
- type: filter
filter: duration
negated: false
key:
type: keySimple
value: measurements.fp
quoted: false
operator: '>'
value:
type: valueDuration
value: 1.5
unit: s
- type: spaces
value: ''
- query: measurements.fp:<1.5s
result:
- type: filter
filter: duration
negated: false
key:
type: keySimple
value: measurements.fp
quoted: false
operator: <
value:
type: valueDuration
value: 1.5
unit: s
- type: spaces
value: ''
- name: duration_op_breakdowns_filter
cases:
- query: spans.browser:1.5s
result:
- type: filter
filter: duration
negated: false
key:
type: keySimple
value: spans.browser
quoted: false
operator: ''
value:
type: valueDuration
value: 1.5
unit: s
- type: spaces
value: ''
- query: spans.browser:>1.5s
result:
- type: filter
filter: duration
negated: false
key:
type: keySimple
value: spans.browser
quoted: false
operator: '>'
value:
type: valueDuration
value: 1.5
unit: s
- type: spaces
value: ''
- query: spans.browser:<1.5s
result:
- type: filter
filter: duration
negated: false
key:
type: keySimple
value: spans.browser
quoted: false
operator: <
value:
type: valueDuration
value: 1.5
unit: s
- type: spaces
value: ''
- name: duration_aggregate_measurements_filter
cases:
- query: percentile(measurements.fp, 0.5):3.3s
result:
- type: filter
filter: aggregateDuration
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: percentile
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: measurements.fp
quoted: false
- separator: ', '
value:
type: keySimple
value: '0.5'
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: ''
value:
type: valueDuration
value: 3.3
unit: s
- type: spaces
value: ''
- query: percentile(measurements.fp, 0.5):>3.3s
result:
- type: filter
filter: aggregateDuration
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: percentile
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: measurements.fp
quoted: false
- separator: ', '
value:
type: keySimple
value: '0.5'
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: '>'
value:
type: valueDuration
value: 3.3
unit: s
- type: spaces
value: ''
- query: percentile(measurements.fp, 0.5):<3.3s
result:
- type: filter
filter: aggregateDuration
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: percentile
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: measurements.fp
quoted: false
- separator: ', '
value:
type: keySimple
value: '0.5'
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: <
value:
type: valueDuration
value: 3.3
unit: s
- type: spaces
value: ''
- name: duration_aggregate_op_breakdowns_filter
cases:
- query: percentile(spans.browser, 0.5):3.3s
result:
- type: filter
filter: aggregateDuration
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: percentile
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: spans.browser
quoted: false
- separator: ', '
value:
type: keySimple
value: '0.5'
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: ''
value:
type: valueDuration
value: 3.3
unit: s
- type: spaces
value: ''
- query: percentile(spans.browser, 0.5):>3.3s
result:
- type: filter
filter: aggregateDuration
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: percentile
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: spans.browser
quoted: false
- separator: ', '
value:
type: keySimple
value: '0.5'
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: '>'
value:
type: valueDuration
value: 3.3
unit: s
- type: spaces
value: ''
- query: percentile(spans.browser, 0.5):<3.3s
result:
- type: filter
filter: aggregateDuration
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: percentile
quoted: false
args:
type: keyAggregateArgs
args:
- separator: ''
value:
type: keySimple
value: spans.browser
quoted: false
- separator: ', '
value:
type: keySimple
value: '0.5'
quoted: false
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: <
value:
type: valueDuration
value: 3.3
unit: s
- type: spaces
value: ''
- name: aggregate_rel_time_filter
cases:
- query: last_seen():+7d
result:
- type: filter
filter: aggregateRelativeDate
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: last_seen
quoted: false
args: null
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: ''
value:
type: valueRelativeDate
value: 7
sign: +
unit: d
- type: spaces
value: ''
- query: last_seen():-2w
result:
- type: filter
filter: aggregateRelativeDate
negated: false
key:
type: keyAggregate
name:
type: keySimple
value: last_seen
quoted: false
args: null
argsSpaceBefore:
type: spaces
value: ''
argsSpaceAfter:
type: spaces
value: ''
operator: ''
value:
type: valueRelativeDate
value: 2
sign: '-'
unit: w
- type: spaces
value: ''
- query: random:-2w
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: '-2w'
quoted: false
- type: spaces
value: ''
- name: quotes_filtered_on_raw
cases:
- desc: Enclose the full raw query? Strip it.
query: thinger:unknown "what is this?"
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: thinger
quoted: false
operator: ''
value:
type: valueText
value: unknown
quoted: false
- type: spaces
value: ' '
- type: freeText
value: what is this?
quoted: true
- type: spaces
value: ''
- desc: Enclose the full query? Strip it and the whole query is raw.
query: '"thinger:unknown what is this?"'
result:
- type: freeText
value: thinger:unknown what is this?
quoted: true
- type: spaces
value: ''
- desc: Allow a single quotation at end
query: end"
result:
- type: freeText
value: end"
quoted: false
- type: spaces
value: ''
- desc: Allow a single quotation at beginning
query: '"beginning'
result:
- type: freeText
value: '"beginning'
quoted: false
- type: spaces
value: ''
- desc: Allow a single quotation
query: '"'
result:
- type: freeText
value: '"'
quoted: false
- type: spaces
value: ''
- desc: Empty quotations become a dropped term
query: '""'
result:
- type: freeText
value: ''
quoted: true
- type: spaces
value: ''
- desc: Allow a search for space
query: '" "'
result:
- type: freeText
value: ' '
quoted: true
- type: spaces
value: ''
- desc: Strip in a balanced manner
query: '""woof"'
result:
- type: freeText
value: ''
quoted: true
- type: spaces
value: ''
- type: freeText
value: woof"
quoted: false
- type: spaces
value: ''
- desc: Don't try this at home kids
query: '"""""""""'
result:
- type: freeText
value: ''
quoted: true
- type: spaces
value: ''
- type: freeText
value: ''
quoted: true
- type: spaces
value: ''
- type: freeText
value: ''
quoted: true
- type: spaces
value: ''
- type: freeText
value: ''
quoted: true
- type: spaces
value: ''
- type: freeText
value: '"'
quoted: false
- type: spaces
value: ''
- name: basic_fallthrough
cases:
- query: random:<hello
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: <hello
quoted: false
- type: spaces
value: ''
- query: random:<512.1.0
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: <512.1.0
quoted: false
- type: spaces
value: ''
- query: random:2018-01-01
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: '2018-01-01'
quoted: false
- type: spaces
value: ''
- query: random:+7d
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: +7d
quoted: false
- type: spaces
value: ''
- query: random:>2018-01-01
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: '>2018-01-01'
quoted: false
- type: spaces
value: ''
- query: random:hello
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: hello
quoted: false
- type: spaces
value: ''
- query: random:123
result:
- type: filter
filter: text
negated: false
key:
type: keySimple
value: random
quoted: false
operator: ''
value:
type: valueText
value: '123'
quoted: false
- type: spaces
value: ''
- name: empty_string
cases:
- desc: Empty quotations become a dropped term
query: ''
result: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment