Hi Team, Trying to use graphql query to search dat...
# troubleshoot
h
Hi Team, Trying to use graphql query to search datasets using keywords , tags and domains using below query. How to filter using multiple keywords ?
Copy code
{
  searchAcrossEntities(input: {
    types: [DATASET], 
    query: "*edi*",
    orFilters: [
      {
        and: [
          {
            field: "tags",
            values: ["urn:li:tag:phi"],
            condition: EQUAL
          },
          {
            field: "domains",
            values: ["urn:li:domain:hsdjfsdf"],
            condition: EQUAL
          }
        ]
      }
    ]
  }) {
    searchResults {
      entity {
        urn
        type
      }
    }
  }
}
1
a
Hi, please see https://datahubproject.io/docs/graphql/inputObjects#andfilterinput. You can use this field to provide a filter list
orFilters has been deprecated
(Depending on your version)
CC: @echoing-airport-49548
e
Hi Keerthi, let me know if that helps!
h
@echoing-airport-49548 - I am using https://datahubproject.io/docs/graphql/inputObjects#searchacrossentitiesinput , here it was mentioning to use orFilters. We are currently on 0.9.3 , which is the right input to use ?
@echoing-airport-49548 - Also the query: "*edi*" doesnt seem to be filtering the right resources , should i be using it in the orFilters input ? ( trying to filter the dataset based on the name , tags and domain)
Issue resolved. to filter on multiple conditions using -
Copy code
query=*edi* OR *test*
@echoing-airport-49548 - the above query works well in 0.9.3 , but when we upgraded we are unable to get results in 0.10.1. How would you suggest to query the datasets by name in 0.10.1