Hi Everyone, I am trying to get those datasets whi...
# troubleshoot
h
Hi Everyone, I am trying to get those datasets which have description starting with Project, but I do not get any results ( even if I give * ) -
Copy code
{
  search(input: {start: 0, count: 100, query: "*", type: DATASET,filters:{field:"description",value:"Project*"}}) {
    searchResults {
      entity {
        urn
        type
      }
      matchedFields {
        name
        value
      }
    }
  }
}
b
Hi there! This is because when using the
filters
field, we will expect that the filters are exact matches when performing the search. To accomplish this, you could use a query that searches on a particular index field, but this will simply return all assets that contain "Project" in their description. From the results, you'll need to further parse to check each description:
Copy code
{
  search(input: {start: 0, count: 100, query: "description.delimited:Project", type: DATASET}) {
    searchResults {
      entity {
        urn
        type
      }
      matchedFields {
        name
        value
      }
    }
  }
}
h
@big-carpet-38439 Got it. How to I specify if I want to search if a field has no content ? Tried null
b
Which field?
If its description you can try hasDescription:true
h
@big-carpet-38439 - tried it , but displays all the datasets, even the ones which have description.
b
You tried hasDescription: false?
I also tried this
And was able to repro
Okay - It seems that hasDescription only filters for those datasets that have no 'native' description, e.g. those coming from the source system itself. We need to think of another way to handle this
h
Yes, I don't have direct access to the Database. But can use the GraphQL
b
Was this ever figured out?