Skip to content

Commit

Permalink
docs(search): add structured search examples for structured properties (
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored and sleeperdeep committed Dec 17, 2024
1 parent 8a937c4 commit 9bc62e0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/how/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9bc62e0

Please sign in to comment.