(query *index.Query)
| 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. |
| 287 | func (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() { |
no test coverage detected