You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Query bar supports EXACT operator, e.g. lang=ru and lang=(ru,fr), but the filter boxes only use the default EQ operator - producing lang:ru which matches both ru and ruo.
Two possible solutions:
Add operator ?: OperatorType -- there could be usecases for other operators like lt -- e.g. options list preset well known values like 25%, 50%, and selecting it produces field<0.25.
Add exactMatch ?: boolean parameter to the FieldValueSelectionFilterConfigType, with default set to false -- not as flexible approach.
Note that ast.addOrFieldValue already supports operator as the 4th optional param, so all that's needed would be to pass it.
* Support operator in field_value_selection filters
Additionally adds a an operator example to the search bar demo,
and use `OperatorType` in all other filters TS declaration.
closes: #3920
* update docs for field_value_selection
* changelog
Co-authored-by: Chandler Prall <[email protected]>
Query bar supports
EXACT
operator, e.g.lang=ru
andlang=(ru,fr)
, but the filter boxes only use the defaultEQ
operator - producinglang:ru
which matches bothru
andruo
.Two possible solutions:
operator ?: OperatorType
-- there could be usecases for other operators likelt
-- e.g. options list preset well known values like 25%, 50%, and selecting it producesfield<0.25
.exactMatch ?: boolean
parameter to theFieldValueSelectionFilterConfigType
, with default set tofalse
-- not as flexible approach.Note that
ast.addOrFieldValue
already supports operator as the 4th optional param, so all that's needed would be to pass it.Relevant code:
eui/src/components/search_bar/filters/field_value_selection_filter.tsx
Line 49 in fa2916e
eui/src/components/search_bar/query/ast.ts
Lines 388 to 392 in 43ccf53
P.S. for now just a community project, low priority unless needed by some Elastic project
The text was updated successfully, but these errors were encountered: