Prasad  S Madugundu created ATLAS-485:
-----------------------------------------

             Summary: Limitations of search by traits with trait hierarchy (or 
super-traits)
                 Key: ATLAS-485
                 URL: https://issues.apache.org/jira/browse/ATLAS-485
             Project: Atlas
          Issue Type: Improvement
            Reporter: Prasad  S Madugundu


Ability to define hierarchical trait types and ability to search metadata by 
tags that considers the hierarchy of trait definitions are very useful for 
defining tag based policies (ex: security policies). As per my experience, the 
search with tags is not completely implemented when there are hierarchy of 
trait definitions.

It seems search by tags follow the OO polymorphism and works as follows:
- If you search metadata by super trait, it will return the metadata that are 
tagged by the given super trait and all its sub-traits.
- If you search metadata by a sub-trait, it will return the metadata that are 
tagged by the given sub-trait only.

For example, I have 2 traits: 
"archived" is sub-trait of "frozen"
 - The metadata can go into frozen state (not archived). And, when the metadata 
is archived it means it is also frozen.

search?query=archived
- Returns all metadata instance IDs that are tagged with "archived" only

search?query=frozen
- Returns all metadata instance IDs that are tagged with both "frozen" and its 
sub-trait, "archived"


But, if I want to retrieve metadata of a given type by using the tags, it does 
not work as expected.
 
search?query=Account is archived
search?query=from Account where (Account is archived) 
- Returns Accounts that are tagged with "archived" only as expected

search?query=Account is frozen
search?query=from Account where (Account is frozen) 
- I would expect the Accounts that are tagged by both "frozen and "archived". 
But, it returns Accounts that are tagged with frozen only




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to