From e535d72da9fa49631c44eb82972a20bf6030d12e Mon Sep 17 00:00:00 2001 From: david-leifker <114954101+david-leifker@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:24:17 -0500 Subject: [PATCH] docs(search): add structured search examples for structured properties (#11565) --- docs/how/search.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/how/search.md b/docs/how/search.md index 4df5e7c198..2274fe7c09 100644 --- a/docs/how/search.md +++ b/docs/how/search.md @@ -105,6 +105,20 @@ If you want to: - ```/q customProperties: encoding*``` [Sample results](https://demo.datahubproject.io/search?page=1&query=%2Fq%20customProperties%3A%20encoding%2A) - Dataset Properties are indexed in ElasticSearch the manner of key=value. Hence if you know the precise key-value pair, you can search using ```"key=value"```. However, if you only know the key, you can use wildcards to replace the value and that is what is being done here. +- Find an entity with an **unversioned** structured property + - ```/q structuredProperties.io_acryl_privacy_retentionTime01:60``` + - This will return results for an **unversioned** structured property's qualified name `io.acryl.private.retentionTime01` and value `60`. + - ```/q _exists_:structuredProperties.io_acryl_privacy_retentionTime01``` + - In this example, the query will return any entity which has any value for the **unversioned** structured property with qualified name `io.acryl.private.retentionTime01`. + +- Find an entity with a **versioned** structured property + - ```/q structuredProperties._versioned.io_acryl_privacy_retentionTime.20240614080000.number:365``` + - This query will return results for a **versioned** structured property with qualified name `io.acryl.privacy.retentionTime`, version `20240614080000`, type `number` and value `365`. + - ```/q _exists_:structuredProperties._versioned.io_acryl_privacy_retentionTime.20240614080000.number``` + - Returns results for a **versioned** structured property with qualified name `io.acryl.privacy.retentionTime`, version `20240614080000` and type `number`. + - ```/q structuredProperties._versioned.io_acryl_privacy_retentionTime.\*.\*:365``` + - Returns results for a **versioned** structured property with any version and type with a values of `365` + - Find a dataset with a column name, **latitude** - ```/q fieldPaths: latitude``` [Sample results](https://demo.datahubproject.io/search?page=1&query=%2Fq%20fieldPaths%3A%20latitude) - fieldPaths is the name of the attribute that holds the column name in Datasets.