The `andFilter` in the `orFilters` in `SearchInput...
# troubleshoot
a
The
andFilter
in the
orFilters
in
SearchInput
seems to require all fields of a dataset to match the `andFilter`'s condition. Otherwise, the dataset won't be returned. For example, say we have a dataset that has the following columns and tags defined
Copy code
col1: [tagA, tagB]
col2: [tagA]
If I do a GraphQL query below. Then the dataset is not returned, even though
col2
satisfied the filter condition.
Copy code
query searchDataset {
  search(input: {
    type: DATASET, 
    query: "", 
    start: 0, 
    count: 1000,
    orFilters: [
      {
        and: [
          {
            field: "fieldTags",
            values: ["urn:li:tag:tagA"]
            condition: CONTAIN
          }
          {
            field: "fieldTags",
            values: ["urn:li:tag:tagB"]
            condition: CONTAIN
            negated: true
          }
        ]
      }
    ]
  }) {
    start
    count
    total
    searchResults {
      entity {
        urn
        type
      }
    }
  
}
}
What I want is if at least one column satisfies the tag filter condition, then the dataset should be returned. How can I achieve this?
I looked through the ES related code and my guess is this is impossible now because
fieldTags
and
editableFieldTags
are not indexed as nested fields in ES. Therefore, ES cannot really differentiate the tags of different fields. It would be good if someone can confirm this though.