From 11cbd8c59230df34766696c778921f1259fb2958 Mon Sep 17 00:00:00 2001 From: Gabe Lyons Date: Fri, 2 Aug 2024 07:06:44 -0700 Subject: [PATCH] Add correct usage of orFilters in search API docs --- docs/how/search.md | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/docs/how/search.md b/docs/how/search.md index 6befb0a1e54f2..c809ab1efba12 100644 --- a/docs/how/search.md +++ b/docs/how/search.md @@ -148,24 +148,42 @@ The same GraphQL API that powers the Search UI can be used for integrations and programmatic use-cases. ``` -# Example query -{ - searchAcrossEntities( - input: {types: [], query: "*", start: 0, count: 10, filters: [{field: "fieldTags", value: "urn:li:tag:Dimension"}]} +# Example query - search for datasets matching the example_query_text who have the Dimension tag applied to a schema field and are from the data platform looker +query searchEntities { + search( + input: { + type: DATASET, + query: "example_query_text", + orFilters: [ + { + and: [ + { + field: "fieldTags", + values: ["urn:li:tag:Dimension"] + }, + { + field: "platform", + values: ["urn:li:dataPlatform:looker"] + } + ] + } + ], + start: 0, + count: 10 + } ) { start count total searchResults { entity { + urn type ... on Dataset { - urn - type + name platform { name } - name } } }