[Merged by Bors] - feat: add exclution operator logic (NLU-864) #462
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief description. What is this change?
Extend exclude field with option to provide condition operator
Implementation details. How do you make this change?
We make an exclude field in the tags filter in the same format as include. The main reason to make these fields identical in their structure is to avoid confusion for our users
How it should work:
Let's say we have a document with such a list of tags:
["tag1", "tag2", "tag3"]
{"tags": {"includeAllTagged": true, "exclude": {"items": ["tag1", "tag5"], "operator": "or"}}}
:This query should not return this document, because it is enough for at least one of the elements in
exclude.items
to be in documents to skip it{"tags": {"includeAllTagged": true, "exclude": {"items": ["tag1", "tag5"], "operator": "and"}}}
:This query should return a document because the document does not have
tag5
and the query only bars documents that have bothtag1 AND tag5
# NOTE: need to update
general-runtime
base-types
libs version for apply that changesRelated PRs
Development Notes:
KnowledgeLake
sideChecklist