MCPcopy Create free account
hub / github.com/Debian/dcs / query

Method query

internal/sourcebackend/sourcebackend.go:276–289  ·  view source on GitHub ↗
(query *index.Query)

Source from the content-addressed store, hash-verified

274 possible := make([]string, len(post))
275 var err error
276 for idx, docid := range post {
277 possible[idx], err = s.Index.DocidMap.Lookup(docid)
278 if err != nil {
279 return nil, err
280 }
281 }
282 return possible, nil
283}
284
285// Reads a single JSON request from the TCP connection, performs the search and
286// sends results back over the TCP connection as they appear.
287func (s *Server) Search(in *sourcebackendpb.SearchRequest, stream sourcebackendpb.SourceBackend_SearchServer) error {
288 connMu := new(sync.Mutex)
289 logprefix := fmt.Sprintf("[%q]", in.Query)
290
291 flags := syntax.Perl
292 if in.GetLiteral() {

Callers 1

SearchMethod · 0.95

Calls 2

LookupMethod · 0.80
PostingQueryMethod · 0.45

Tested by

no test coverage detected