[2/2] atlas git commit: ATLAS-2024: Updated Atlas TWiki for basic search functionality (ATLAS-1880)
ATLAS-2024: Updated Atlas TWiki for basic search functionality (ATLAS-1880) Signed-off-by: nixonrodrigues Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/bb4b98b5 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/bb4b98b5 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/bb4b98b5 Branch: refs/heads/0.8-incubating Commit: bb4b98b51ee0bc01a2e48ceb71dfd77221eb9cef Parents: 8f8e441 Author: apoorvnaik Authored: Fri Aug 4 09:29:12 2017 -0700 Committer: nixonrodrigues Committed: Wed Aug 9 14:22:02 2017 +0530 -- docs/src/site/twiki/Search.twiki | 211 ++ 1 file changed, 188 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/bb4b98b5/docs/src/site/twiki/Search.twiki -- diff --git a/docs/src/site/twiki/Search.twiki b/docs/src/site/twiki/Search.twiki index 173b053..6d17408 100644 --- a/docs/src/site/twiki/Search.twiki +++ b/docs/src/site/twiki/Search.twiki @@ -1,10 +1,175 @@ ---+ Search Atlas exposes search over the metadata in two ways: - * Search using DSL - * Full-text search + * Basic Search + * Advanced Search (DSL or Full-Text) ++ Search DSL Grammar +---++ Basic search +The basic search allows you to query using typename of an entity, associated classification/tag +and has support for filtering on the entity attribute(s) as well as the classification/tag attributes. + +The entire query structure can be represented using the following JSON structure (called !SearchParameters) + + +{ + "typeName": "hive_table", + "excludeDeletedEntities": true, + "classification" : "", + "query": "", + "limit": 25, + "offset": 0, + "entityFilters": { + "attributeName": "name", + "operator": "contains", + "attributeValue": "testtable" + }, + "tagFilters": null, + "attributes": [""] +} + + +__Field description__ + + * typeName: The type of entity to look for + * excludeDeletedEntities: Should the search include deleted entities too (default: true) + * classification: Only include entities with given Classification/tag + * query: Any free text occurrence that the entity should have (generic/wildcard queries might be slow) + * limit: Max number of results to fetch + * offset: Starting offset of the result set (useful for pagination) + * entityFilters: Entity Attribute filter(s) + * tagFilters: Classification/tag Attribute filter(s) + * attributes: Attributes to include in the search result (default: include any attribute present in the filter) + + Attribute based filtering can be done on multiple attributes with AND/OR condition. + +*NOTE: The tagFilters and entityFilters field have same JSON structure.* + +__Examples of filtering (for hive_table attributes)__ + * Single attribute + + { + "typeName": "hive_table", + "excludeDeletedEntities": true, + "classification" : "", + "query": "", + "limit": 50, + "offset": 0, + "entityFilters": { +"attributeName": "name", +"operator": "contains", +"attributeValue": "testtable" + }, + "tagFilters": null, + "attributes": [""] + } + + * Multi-attribute with OR + + { + "typeName": "hive_table", + "excludeDeletedEntities": true, + "classification" : "", + "query": "", + "limit": 50, + "offset": 0, + "entityFilters": { +"condition": "OR", +"criterion": [ + { + "attributeName": "name", + "operator": "contains", + "attributeValue": "testtable" + }, + { + "attributeName": "owner", + "operator": "eq", + "attributeValue": "admin" + } +] + }, + "tagFilters": null, + "attributes": [""] + } + + * Multi-attribute with AND + + { + "typeName": "hive_table", + "excludeDeletedEntities": true, + "classification" : "", + "query": "", + "limit": 50, + "offset": 0, + "entityFilters": { +"condition": "AND", +"criterion": [ + { + "attributeName": "name", + "operator": "contains", + "attributeValue": "testtable" + }, + { + "attributeName": "owner", + "operator": "eq", + "attributeValue": "admin" + } +] + }, + "tagFilters": null, + "attributes": [""] + } + + +__Supported operators for filtering__ + + * LT (symbols: <, lt) works with Numeric, Date attributes + * GT (symbols: >, gt) works with Numeric, Date attributes + * LTE (symbols: <=, lte) works with Numeric, Date attributes + * GTE (symbols: >=, gte) works with Numeric, Date attribut
[2/2] atlas git commit: ATLAS-2024: Updated Atlas TWiki for basic search functionality (ATLAS-1880)
ATLAS-2024: Updated Atlas TWiki for basic search functionality (ATLAS-1880) Signed-off-by: nixonrodrigues Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/fb28760a Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/fb28760a Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/fb28760a Branch: refs/heads/master Commit: fb28760a37aaec81df69b05936cc4234e20380ec Parents: 1298c83 Author: apoorvnaik Authored: Fri Aug 4 09:29:12 2017 -0700 Committer: nixonrodrigues Committed: Wed Aug 9 13:57:21 2017 +0530 -- docs/src/site/twiki/Search.twiki | 211 ++ 1 file changed, 188 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/fb28760a/docs/src/site/twiki/Search.twiki -- diff --git a/docs/src/site/twiki/Search.twiki b/docs/src/site/twiki/Search.twiki index 173b053..6d17408 100644 --- a/docs/src/site/twiki/Search.twiki +++ b/docs/src/site/twiki/Search.twiki @@ -1,10 +1,175 @@ ---+ Search Atlas exposes search over the metadata in two ways: - * Search using DSL - * Full-text search + * Basic Search + * Advanced Search (DSL or Full-Text) ++ Search DSL Grammar +---++ Basic search +The basic search allows you to query using typename of an entity, associated classification/tag +and has support for filtering on the entity attribute(s) as well as the classification/tag attributes. + +The entire query structure can be represented using the following JSON structure (called !SearchParameters) + + +{ + "typeName": "hive_table", + "excludeDeletedEntities": true, + "classification" : "", + "query": "", + "limit": 25, + "offset": 0, + "entityFilters": { + "attributeName": "name", + "operator": "contains", + "attributeValue": "testtable" + }, + "tagFilters": null, + "attributes": [""] +} + + +__Field description__ + + * typeName: The type of entity to look for + * excludeDeletedEntities: Should the search include deleted entities too (default: true) + * classification: Only include entities with given Classification/tag + * query: Any free text occurrence that the entity should have (generic/wildcard queries might be slow) + * limit: Max number of results to fetch + * offset: Starting offset of the result set (useful for pagination) + * entityFilters: Entity Attribute filter(s) + * tagFilters: Classification/tag Attribute filter(s) + * attributes: Attributes to include in the search result (default: include any attribute present in the filter) + + Attribute based filtering can be done on multiple attributes with AND/OR condition. + +*NOTE: The tagFilters and entityFilters field have same JSON structure.* + +__Examples of filtering (for hive_table attributes)__ + * Single attribute + + { + "typeName": "hive_table", + "excludeDeletedEntities": true, + "classification" : "", + "query": "", + "limit": 50, + "offset": 0, + "entityFilters": { +"attributeName": "name", +"operator": "contains", +"attributeValue": "testtable" + }, + "tagFilters": null, + "attributes": [""] + } + + * Multi-attribute with OR + + { + "typeName": "hive_table", + "excludeDeletedEntities": true, + "classification" : "", + "query": "", + "limit": 50, + "offset": 0, + "entityFilters": { +"condition": "OR", +"criterion": [ + { + "attributeName": "name", + "operator": "contains", + "attributeValue": "testtable" + }, + { + "attributeName": "owner", + "operator": "eq", + "attributeValue": "admin" + } +] + }, + "tagFilters": null, + "attributes": [""] + } + + * Multi-attribute with AND + + { + "typeName": "hive_table", + "excludeDeletedEntities": true, + "classification" : "", + "query": "", + "limit": 50, + "offset": 0, + "entityFilters": { +"condition": "AND", +"criterion": [ + { + "attributeName": "name", + "operator": "contains", + "attributeValue": "testtable" + }, + { + "attributeName": "owner", + "operator": "eq", + "attributeValue": "admin" + } +] + }, + "tagFilters": null, + "attributes": [""] + } + + +__Supported operators for filtering__ + + * LT (symbols: <, lt) works with Numeric, Date attributes + * GT (symbols: >, gt) works with Numeric, Date attributes + * LTE (symbols: <=, lte) works with Numeric, Date attributes + * GTE (symbols: >=, gte) works with Numeric, Date attributes + *