aws / aws/event-ruler

Support for $and operand

Open
#69 21 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
615
Forks
82
Avg merge
1d 22h
Merged PRs (30d)
7

Description

## What is your idea?
It would be great to allow an `$and` operand, (overcoming JSON "last-one-in-wins" semantics for fields) to enable tagging multiple conditions to a given field. I think this may be possible given how I interpret the implementation of the `$or` operand. For example, this would exclude any value that (starts with "abc" AND ends with "123" AND also excludes "notmyvalue" and "alsonotmyvalue").

```
{ "$and": [
{"myField": [{"anything-but": ["notmyvalue", "alsonotmyvalue"]}]},
{"myField": [{"anything-but": {"suffix": "123"}}]},
{"myField": [{"anything-but": {"prefix": "abc"}}]}
]
}
```

## Would you be willing to make the change?
Maybe

## Additional context

Add any other context (such as images, docs, posts) about the idea here.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing $or operand implementation and the example in this issue, focusing on how multiple conditions for one field are represented and matched. The work is done when an $and operand supports the shown combination of conditions without JSON last-one-in-wins behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.