Skip to content

Commit

Permalink
Make Field Name Search Filter Case Insensitive (#6759)
Browse files Browse the repository at this point in the history
* Make Field Name Filter Case Insensitive

Signed-off-by: Suchit Sahoo <[email protected]>

* Changeset file for PR #6759 created/updated

---------

Signed-off-by: Suchit Sahoo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
LDrago27 and opensearch-changeset-bot[bot] authored May 10, 2024
1 parent 7d9b3cd commit a3d255e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/6759.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Make Field Name Search Filter Case Insensitive ([#6759](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6759))
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export function isFieldFiltered(
field.type === '_source' ||
field.scripted ||
fieldCounts[field.name] > 0;
const matchName = !filterState.name || field.name.indexOf(filterState.name) !== -1;
const matchName =
!filterState.name || field.name.toLowerCase().indexOf(filterState.name.toLowerCase()) !== -1; // case insensitive matching name

return matchFilter && isAggregatable && isSearchable && scriptedOrMissing && matchName;
}

0 comments on commit a3d255e

Please sign in to comment.