Skip to content

Commit

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



* Changeset file for PR #6759 created/updated

---------



(cherry picked from commit a3d255e)

Signed-off-by: Suchit Sahoo <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored May 14, 2024
1 parent d4c4b41 commit 0447628
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 0447628

Please sign in to comment.