Add relatesNotTo to search filters
Guillaume Hanique
Context
https://docs.getport.io/search-and-query/#relation-structure-and-operators describes how to search for Entities that have a relation to other Entities. This can be used with the search API (https://api.getport.io/v1/entities/search) and with the filters when adding a visualization to a dashboard for example.
This type of search only has one operator:
relatedTo
.Objective
Add an opposite operator, i.e.
relatesNotTo
.Rationale
Sometimes the business context dictates that certain relationships SHOULD be present in the data. By adding this operator it becomes possible to find inconsistencies in the data by searching for Entities that do NOT have a relationship (where one is expected).
Guy Berman
Merged in a post:
Search API | Search entities that are not related to any entity on a certain blueprint
Matar Peles
Today you can only use relatedTo to check if an entity is connected to a certain entity on a related blueprint. When using Port I'd want also to check the entities that are not connected at all to any entity in the related blueprint.
For example -
All Workloads that are null in the "Namespace" relation
V
Victor Pascual Villanueva
That'd be super helpful also for us! �
M
Mark Tarry
Another potential example (based on https://demo.getport.io/my_portal_feedback)
* Feedback items are raised, and have a relation back to the User (entity) who raised it
* Dashboard shows an overview of "My Feedback" - i.e. items raised by the current user, using the
relatedTo
search operator* Dashboard also shows a list of feedback from others - without duplicating the users own feedback
It's this final list which would benefit from a
notRelatedTo
search operator