Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Support custom filters when ignoreFilterIfFieldNotInIndex is enabled #5581

Closed
anand3493 opened this issue Oct 26, 2023 · 1 comment · Fixed by #5577
Closed

[BUG] Support custom filters when ignoreFilterIfFieldNotInIndex is enabled #5581

anand3493 opened this issue Oct 26, 2023 · 1 comment · Fixed by #5577
Assignees
Labels
bug Something isn't working

Comments

@anand3493
Copy link

What is the bug?
When using the advanced setting courier:ignoreFilterIfFieldNotInIndex custom query DSL filters never get sent.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Go to advanced settings and enable ignoreFilterIfFieldNotInIndex
  2. Create a visualization
  3. Apply a query DSL filter

What is the expected behavior?
The query DSL filter should be sent in the request and response should be based on this filter
What is the Actual behavior?
The query dsl filter is not even sent in request and hence desired result is not seen.

What is your host/environment?

  • OS: AWS
  • Version Opensearch 2.3/2.7

Do you have any screenshots?
I have applied a prefix filter here using query dsl , string should start by certain value. But only to get undesired results.
image

Request Screenshot:
image

@anand3493 anand3493 added bug Something isn't working untriaged labels Oct 26, 2023
kavilla referenced this issue in kavilla/OpenSearch-Dashboards-1 Dec 6, 2023
When enabling the advanced setting `courier:ignoreFilterIfFieldNotInIndex`
Custom OpenSearch Query DSL filters could technically be applied to index
patterns that map to indices that are not exactly the same. Since the
custom query filter is a user input then users can really type anything
that they need. Or any field that they know is present but we do not know
for sure.

Therefore, we can check if the id which is the index pattern title to check
if we should apply the filter or not.

Issue resolved:
https://github.com/opensearch-project/dashboards-visualizations/issues/281

I believe issue:
opensearch-project#5423

Should closed as that is expected functionality.

Signed-off-by: Kawika Avilla <[email protected]>
kavilla referenced this issue in kavilla/OpenSearch-Dashboards-1 Dec 6, 2023
When enabling the advanced setting `courier:ignoreFilterIfFieldNotInIndex`
Custom OpenSearch Query DSL filters could technically be applied to index
patterns that map to indices that are not exactly the same. Since the
custom query filter is a user input then users can really type anything
that they need. Or any field that they know is present but we do not know
for sure.

Therefore, we can check if the id which is the index pattern title to check
if we should apply the filter or not.

Issue resolved:
https://github.com/opensearch-project/dashboards-visualizations/issues/281

I believe issue:
opensearch-project#5423

Should closed as that is expected functionality.

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla
Copy link
Member

kavilla commented Dec 6, 2023

@opensearch-project/admin please transfer this repo to the OpenSearch-Dashboards.

kavilla referenced this issue in kavilla/OpenSearch-Dashboards-1 Dec 6, 2023
When enabling the advanced setting `courier:ignoreFilterIfFieldNotInIndex`
Custom OpenSearch Query DSL filters could technically be applied to index
patterns that map to indices that are not exactly the same. Since the
custom query filter is a user input then users can really type anything
that they need. Or any field that they know is present but we do not know
for sure.

Therefore, we can check if the id which is the index pattern title to check
if we should apply the filter or not.

Issue resolved:
https://github.com/opensearch-project/dashboards-visualizations/issues/281

I believe issue:
opensearch-project#5423

Should closed as that is expected functionality.

Signed-off-by: Kawika Avilla <[email protected]>
@gaiksaya gaiksaya transferred this issue from opensearch-project/dashboards-visualizations Dec 6, 2023
@kavilla kavilla removed the untriaged label Dec 7, 2023
@kavilla kavilla self-assigned this Dec 7, 2023
@kavilla kavilla linked a pull request Dec 7, 2023 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants