Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Facets to Graph schema #182

Open
shashankpr opened this issue Feb 17, 2020 · 0 comments
Open

Add Facets to Graph schema #182

shashankpr opened this issue Feb 17, 2020 · 0 comments
Labels
enhancement New feature or request ether graph All issues related to Ether Graph - Dgraph, recommendations etc.

Comments

@shashankpr
Copy link
Contributor

Some attributes are currently being used as normal attributes. They need to be converted to FacetType.
E.g: for type Segment, highlight=True needs to be a facet. Similarly, entityCount=int needs to be a facet.

Format changes

Although facets are not first-class citizens in Dgraph (and, hence need not be specifically mentione in schema), Facets need to be represented differently for dgraph to recognize it as a facet.

Normal Format

type TranscriptionSegment {
    highlight=true
}
type ContextSession {
    hasSegment: [uid]
}

Faceted format

type ContextSession {
    hasSegment: [uid]
    hasSegment|highlight = true
}

Things to Note

Hi Guys, I want to update the facets for that I am using the below mutate query and its happening but existing facets are deleting
can anyone resolve the issue ?
{
set {
<0x4e24> <0x4e25> (inyear=2020 ) .
}
}

hackintoshrao:awesome:
For now, you need to read all the facet values before the update, and then only alter the one you intend to, and write all of it back.
There's no way to specifically update one of the facet entry at this point.

@shashankpr shashankpr added enhancement New feature or request ether graph All issues related to Ether Graph - Dgraph, recommendations etc. labels Feb 17, 2020
@shashankpr shashankpr self-assigned this Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ether graph All issues related to Ether Graph - Dgraph, recommendations etc.
Projects
None yet
Development

No branches or pull requests

1 participant