Allow facets at the schema level

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)

This issue is related to another suggestion with similar motivation at

Anonymous commented :

This is exactly the same issue I hit with dgraph and was forced to use bleve.

Integrating facets like described above would be highly useful.

Is there a performance reason it was not done this way or was it more to do with preimagined use cases for dgraph.

campoy commented :

Hi there,

I just wanted to let you all know that we’re now considering different improvements to how we handle facets.
I will evaluate multiple proposals and seeing which ones make it to the roadmap.

Thanks again for your contributions, I might come back to ask follow-up questions in a couple of weeks.

any news on this ?