Basic search enhancement
While performing basic search in Atlas, you can exclude header attributes of entities from the response to reduce latency.
The Basic Search feature in Atlas has AtlasEntityHeader data type of each
entity in the response.
The AtlasEntityHeader data type has multiple attributes including
classification and terms. AtlasEntityHeader requests the Janusgraph database to
provide the information for each attribute. This process can be time consuming increasing the
response latency.
To overcome this situation, you can add a flag to exclude generic attributes and add only the
selected attributes from the attributes field in the response.
In the request payload, including the following improves the search experience:
- Attributes having
entityTypes excludeHeaderAttributes=true- Valid entity attributes (not relationship) in the
attributesfield
An example payload request:
Request
{
"excludeDeletedEntities": true,
"includeSubClassifications": true,
"includeSubTypes": true,
"includeClassificationAttributes": true,
"limit": 25,
"offset": 0,
"typeName": "hdfs_path",
"attributes": ["path", "name"],
"excludeHeaderAttributes": "true"
}
Response
{
"queryType": "BASIC",
"searchParameters":
{ "typeName": "hdfs_path", "excludeDeletedEntities": true, "includeClassificationAttributes": true, "includeSubTypes": true, "includeSubClassifications": true, "limit": 25, "offset": 0, "attributes": ["path", "name"] }
,
"attributes": {
"name": ["path", "name"],
"values": [
["/data/warehouse/customer", "customer"],
["/data/warehouse/sales", "sales"]
]
},
"approximateCount": 2
}
