Skip to content

Fixes #27482: Fix Advanced Search between boundaries for custom numerical properties#27486

Open
aniruddhaadak80 wants to merge 1 commit intoopen-metadata:mainfrom
aniruddhaadak80:fix-advanced-search-between-number-27482
Open

Fixes #27482: Fix Advanced Search between boundaries for custom numerical properties#27486
aniruddhaadak80 wants to merge 1 commit intoopen-metadata:mainfrom
aniruddhaadak80:fix-advanced-search-between-number-27482

Conversation

@aniruddhaadak80
Copy link
Copy Markdown

@aniruddhaadak80 aniruddhaadak80 commented Apr 17, 2026

Describe your changes:

Fixes #27482

I worked on QueryBuilderElasticsearchFormatUtils.js because the RAQB between boundaries (i.e. [10, 20]) were incorrectly stripped of the upper bound during buildExtensionQuery. This passes the entire bounding Array correctly, repairing Advanced Search filtering.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@aniruddhaadak80 aniruddhaadak80 requested a review from a team as a code owner April 17, 2026 14:49
Copilot AI review requested due to automatic review settings April 17, 2026 14:49
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 17, 2026

Code Review ✅ Approved

Updates Advanced Search to correctly handle boundary values for custom numerical properties. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 value array (instead of value[0]) when building extension-field queries, allowing between to retain both bounds.

Comment on lines 739 to 745
return buildExtensionQuery(
extensionPropertyName,
entityType,
hasValue ? value[0] : null,
hasValue ? value : null,
op,
not
);
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@aniruddhaadak80 aniruddhaadak80 changed the title Fix Advanced Search 'between' boundaries for custom numerical properties (#27482) Fixes #27482: Fix Advanced Search between boundaries for custom numerical properties Apr 17, 2026
@aniruddhaadak80
Copy link
Copy Markdown
Author

aniruddhaadak80 commented Apr 17, 2026

hi maintainers could someone please add the safe to test label so the pipelines can run, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants