MCPcopy Create free account
hub / github.com/apache/answer-plugins / UpdateContent

Method UpdateContent

search-elasticsearch/es.go:121–126  ·  view source on GitHub ↗
(ctx context.Context, content *plugin.SearchContent)

Source from the content-addressed store, hash-verified

119}
120
121func (s *SearchEngine) UpdateContent(ctx context.Context, content *plugin.SearchContent) error {
122 if s.Operator == nil {
123 return fmt.Errorf("es client not init")
124 }
125 return s.Operator.SaveDoc(ctx, s.getIndexName(), content.ObjectID, CreateDocFromSearchContent(content.ObjectID, content))
126}
127
128func (s *SearchEngine) DeleteContent(ctx context.Context, contentID string) error {
129 if s.Operator == nil {

Callers

nothing calls this directly

Calls 3

getIndexNameMethod · 0.95
SaveDocMethod · 0.80

Tested by

no test coverage detected