Fixes #27482: Fix Advanced Search between boundaries for custom numerical properties#27486
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedUpdates Advanced Search to correctly handle boundary values for custom numerical properties. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
Pull request overview
Fixes Advanced Search formatting for custom numeric property between filters by ensuring the full boundary array is passed through to the extension/customPropertiesTyped query builder, so Elasticsearch DSL can include both gte and lte.
Changes:
- Pass the complete
valuearray (instead ofvalue[0]) when building extension-field queries, allowingbetweento retain both bounds.
| return buildExtensionQuery( | ||
| extensionPropertyName, | ||
| entityType, | ||
| hasValue ? value[0] : null, | ||
| hasValue ? value : null, | ||
| op, | ||
| not | ||
| ); |
There was a problem hiding this comment.
This change fixes the range-boundary bug, but there’s no regression test covering the advanced-search → Elasticsearch DSL formatting for extension numeric properties with the between operator (i.e., verifying both gte and lte are emitted and change when the second boundary changes). Please add a unit test around elasticSearchFormatForJSONLogic/buildExtensionQuery for an extension.<entity>.<property> field using between to prevent this from regressing again.
|
hi maintainers could someone please add the |
Describe your changes:
Fixes #27482
I worked on QueryBuilderElasticsearchFormatUtils.js because the RAQB
betweenboundaries (i.e.[10, 20]) were incorrectly stripped of the upper bound duringbuildExtensionQuery. This passes the entire bounding Array correctly, repairing Advanced Search filtering.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>