Skip to content

Commit

Permalink
support text match for adv filter
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid committed Dec 2, 2024
1 parent be78dc2 commit b39ea43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/components/advancedSearch/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Filter = forwardRef((props: FilterProps, ref) => {
let newExpr = `${n} ${op} ${value}`;

// rewrite expression if the op is JSON_CONTAINS/ARRAY_CONTAINS
if (op === 'JSON_CONTAINS' || op === 'ARRAY_CONTAINS') {
if (op === 'JSON_CONTAINS' || op === 'ARRAY_CONTAINS' || op ==='TEXT_MATCH') {
newExpr = `${op}(${n}, ${value})`;
}
// rewrite expression if the op is ARRAY_CONTAINS_ALL/ARRAY_CONTAINS_ANY
Expand Down
4 changes: 4 additions & 0 deletions client/src/consts/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export const LOGICAL_OPERATORS = [
value: 'like',
label: 'like',
},
{
value: 'TEXT_MATCH',
label: 'TEXT_MATCH',
},
{
value: 'JSON_CONTAINS',
label: 'JSON_CONTAINS',
Expand Down

0 comments on commit b39ea43

Please sign in to comment.