Hey Everyone :wave:, I am trying to filter glossar...
# troubleshoot
w
Hey Everyone 👋, I am trying to filter glossary term based on the name/urn. Could anyone please help me how the filters would look like ? Details in 🧵
search glossary term :
Copy code
query ($input: SearchInput!) {
  search(input: $input) {
    total
    count
    searchResults {
      entity {
        ... on GlossaryTerm {
          urn
          hierarchicalName
          glossaryTermInfo {
            name
            description
            termSource
          }
        }
      }
    }
  }
}
Search vars i am using
Copy code
search_vars = {"input": {"type": "GLOSSARY_TERM", "query": "*", "count": 50,"filters":filters}}
value for filters i am using :
Copy code
{
    "field": "glossaryTerm",
    "value": "urn:li:glossaryTerm:Discoverd.PII",
                }
I need to basically filter glossary terms based on Node name, for example, i need all the glossary terms that are not starting with keyword ‘Discovered’
b
hey again! on a different thread lol i think I can help you out on this one
if you're looking for all glossary terms where the name does not have the word "Discovered" in the name I believe you can use the below query:
Copy code
query getSearchResultsForMultiple {
    searchAcrossEntities(input: { count: 100, types: [GLOSSARY_TERM], query:  "* NOT name: *Discovered*" }) {
    start  
    count
    total
    	searchResults{
          entity {
            urn
            ... on GlossaryTerm {
              properties {
                  name
              }
            }
          }
        }
    }
}
w
@bulky-soccer-26729 Thank you so much, this is awesome ! 🙏