MCPcopy Create free account
hub / github.com/RTradeLtd/Lens / IsIndexed

Method IsIndexed

engine/engine.go:160–169  ·  view source on GitHub ↗

IsIndexed checks if the given content hash has already been indexed

(hash string)

Source from the content-addressed store, hash-verified

158
159// IsIndexed checks if the given content hash has already been indexed
160func (e *Engine) IsIndexed(hash string) bool {
161 if hash == "" {
162 return false
163 }
164 d, err := e.index.Document(hash)
165 if err == nil && d != nil && d.ID == hash {
166 return true
167 }
168 return false
169}
170
171// Search performs a query
172func (e *Engine) Search(ctx context.Context, q Query) ([]Result, error) {

Callers 2

IndexMethod · 0.95
RemoveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected