Moved from GitHub /2009
Posted by jeffkhull:
As dicussed in a few potential uses Here, adding facets at the schema level would allow a fine-grained schema (many specific predicates) while also allowing logically grouping those schema predicates into higher-level categories. This would enable concise queries which make use a group of predicates by using facets, rather than having to write each predicate individually.
In addition to searching groups of indexes and returning groups of predicates, the ability to return facet values in a query body would allow query responses to become self-descriptive, as in:
{
humanReadablePredicateName: facetValue(predicate, name)
humanReadablePredicateDescription: facetValue(predicate, description)
predicate
}
This issue is related to another suggestion with similar motivation at https://github.com/dgraph-io/dgraph/issues/2000.