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

And/Or/In operators #1740

Open
RegisHubelia opened this issue Oct 23, 2024 · 4 comments
Open

And/Or/In operators #1740

RegisHubelia opened this issue Oct 23, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@RegisHubelia
Copy link
Contributor

RegisHubelia commented Oct 23, 2024

Is your feature request related to a problem? Please describe.
There doesn't seem to be a way to query for multiple values. Maybe I just didn't found how to do it in the code/documentation.

Describe the solution you'd like
It would be really good to be able to do search on multiple values. Example, searching alert custom field for strings, for the sake of simplicity, "A" and "B". Either using Or or And operators so we could find entries in multiple different ways.

{
  "query": {
    "title": {
      "_type": "Or",
      "value": [
        {
            "_type": "Search",
            "value": "A"
        },
        {
            "_type": "Search",
            "value": "B"
        }
      ]
    }
  }
}

// Or Maybe something like:

{
  "query": {
    "customFields": {
      "test":{
        "_type": "In/NotIn...",
        "value": ["A", "B"]
      }
    }
  }
}

Describe alternatives you've considered
Create custom code to search for each string and add it to an array - but it adds extra steps for not a lot of added value.

Thank you for your consideration

@RegisHubelia RegisHubelia added the enhancement New feature or request label Oct 23, 2024
@simlarsen
Copy link
Contributor

@RegisHubelia thank you for posting this, It's on our roadmap.

@RegisHubelia
Copy link
Contributor Author

Happy to contribute if you have the specifications or guidelines for the feature, I can work on implementing it.

@simlarsen
Copy link
Contributor

Sure thing! Please feel free to take a stab at it. Will review + comment on your PR

@RegisHubelia
Copy link
Contributor Author

Okay thanks!

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

No branches or pull requests

2 participants