Dgraph supports composite indexes?

Dgraph supports composite indexes?
for example in neo4j:
CREATE INDEX ON: Person(first_name, last_name)

Nops, indexing are predicate based. But you can do it in another way.

index both first_name and last_name, and then query for:

{
  me(func: eq(first_name, "Steven")) @filter(eq(last_name, "Spielberg")) {
    first_name
    last_name
  }
}
1 Like

oh bad, thats good but i want to search in the fast way

There’s an open request to support composite indexes in Dgraph.

https://github.com/dgraph-io/dgraph/issues/2660

1 Like

I added this comment to the github issue but wanted to bring it up in discussion also.

What do you think of indexing the combination of (edge, facet) as a sort of composite index? It seems like this would fit well with the architecture of dgraph that I have been able to glean so far.