Searching tickets with OR logic using Java Client | Community
Skip to main content

Searching tickets with OR logic using Java Client

  • October 24, 2023
  • 0 replies
  • 0 views

Javier13

Hi mates,

using Java zendesk client I am trying to search tickets that have a custom field that belongs to a given set. For example I want to get the ticket that their custom field "f1" value is "v1" OR "v2".

According to doc if I repeat the property keyword it will act as an OR logic but it does not. 

I'm doing:

String query = "custom_field_xxxxx:value1" + "custom_field_xxxxx:value2";
Iterable<Ticket> ticketsFromSearch = zendesk.getTicketsFromSearch(query);

I have a ticket that matches that "value2" but no ticket is returned.

How should I do this?

Thanks in advance!