And/Or/In operators #646

Open
opened 2026-04-05 16:21:43 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @RegisHubelia on 10/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

*Originally created by @RegisHubelia on 10/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. ```JSON { "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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#646