8000 Add Facets to Graph schema · Issue #182 · etherlabsio/ai-engine · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add Facets to Graph schema #182
Open
@shashankpr

Description

@shashankpr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestether graphAll issues related to Ether Graph - Dgraph, recommendations etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0