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

[Merged by Bors] - feat: add exclution operator logic (NLU-864) #462

Closed
wants to merge 1 commit into from

Conversation

abuyak-vf
Copy link
Contributor

@abuyak-vf abuyak-vf commented Oct 12, 2023

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"]

  • Case 1: {"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

  • Case 1: {"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 both tag1 AND tag5

# NOTE: need to update general-runtime base-types libs version for apply that changes

Related PRs

Development Notes:

  • Don't merge before update KnowledgeLake side

Checklist

  • Make changes in existing tags filters tests
  • Test logic in dev env

@sonarcloud
Copy link

sonarcloud bot commented Oct 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

warning The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@abuyak-vf
Copy link
Contributor Author

bors r+

bors-vf bot pushed a commit that referenced this pull request Oct 12, 2023
### Brief description. What is this change?

Extend exclude field with option to provide condition operator
@bors-vf
Copy link

bors-vf bot commented Oct 12, 2023

Pull request successfully merged into master.

Build succeeded:

@bors-vf bors-vf bot changed the title feat: add exclution operator logic (NLU-864) [Merged by Bors] - feat: add exclution operator logic (NLU-864) Oct 12, 2023
@bors-vf bors-vf bot closed this Oct 12, 2023
@bors-vf bors-vf bot deleted the abuyak/feat/NLU-864-extend-tags-exclution branch October 12, 2023 22:04
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.

2 participants