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

fix: unknown filter should return empty set #663

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kptdobe
Copy link
Contributor

@kptdobe kptdobe commented Oct 4, 2024

While working on a conversion filter, I was surprised by the results: they had a tendency to be really good while I was expecting low results. I realised that if one of the facet in the filter is not defined on the DataChunks, it is ignored. This leads to super good results while it is just a misconfiguration of the filter. As a consumer of the cruncher, I did not know I was using the filter incorrectly, especially when you start combining multiple of them and you get already a subset of the results, it is impossible to know one is invalid and just ignored.

I think it makes more sense to return no result (and log an error) if someone is trying to filter on something which is not defined. This is much more intuitive.

One of the existing test DataChunk.filter(userAgent) has the problem: it filters on host while host is not defined... The test was incomplete, if you filter by host, you need to have input data with different hosts to make sure you are testing the host filter. This would have reveal the "issue" or showcase this is a desired behaviour.

Copy link

aem-code-sync bot commented Oct 4, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant