Basic search enhancement

While performing basic search in Atlas you can exclude header attributes of entities from the response and avoid issues like latency.

Basic search feature in Atlas has AtlasEntityHeader of each entity in the response.

The AtlasEntityHeader 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 and there could be latency with the response.

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, ensuring the following helps improve the search capabilities:

  • Attributes having entityTypes

  • excludeHeaderAttributes=true

  • Valid entity attributes (not relationship) in the 'attributes' field

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

}