func (x *Index) DeleteMulti(c context.Context, ids []string) error {
	if len(ids) > maxDocumentsPerPutDelete {
		return ErrTooManyDocuments
	}

	req := &pb.DeleteDocumentRequest{
		Params: &pb.DeleteDocumentParams{
			DocId:     ids,
			IndexSpec: &x.spec,
		},
	}
	res := &pb.DeleteDocumentResponse{}
	if err := internal.Call(c, "search", "DeleteDocument", req, res); err != nil {
		return err
	}
	if len(res.Status) != len(ids) {
		return fmt.Errorf("search: internal error: wrong number of results (%d, expected %d)",
			len(res.Status), len(ids))
	}
	multiErr, hasErr := make(appengine.MultiError, len(ids)), false
	for i, s := range res.Status {
		if s.GetCode() != pb.SearchServiceError_OK {
			multiErr[i] = fmt.Errorf("search: %s: %s", s.GetCode(), s.GetErrorDetail())
			hasErr = true
		}
	}
	if hasErr {
		return multiErr
	}
	return nil
}
func (x *Index) DeleteMulti(c context.Context, ids []string) error {
	if len(ids) > maxDocumentsPerPutDelete {
		return ErrTooManyDocuments
	}

	req := &pb.DeleteDocumentRequest{
		Params: &pb.DeleteDocumentParams{
			DocId:     ids,
			IndexSpec: &x.spec,
		},
	}
	res := &pb.DeleteDocumentResponse{}
	if err := internal.Call(c, "search", "DeleteDocument", req, res); err != nil {
		return err
	}
	if len(res.Status) != len(ids) {
		return fmt.Errorf("search: internal error: wrong number of results (%d, expected %d)",
			len(res.Status), len(ids))
	}
	multiErr, hasErr := make(appengine.MultiError, len(ids)), false
	for i, s := range res.Status {
		if s.GetCode() != pb.SearchServiceError_OK {
			multiErr[i] = fmt.Errorf("search: %s: %s", s.GetCode(), s.GetErrorDetail())
			hasErr = true
		}
	}
	if hasErr {
		return multiErr
	}
	return nil
}
func ( x * Index ) DeleteMulti ( c context . Context , ids [ ] string ) error { if len ( ids ) > maxDocumentsPerPutDelete { return ErrTooManyDocuments } req := & pb . DeleteDocumentRequest { Params : & pb . DeleteDocumentParams { DocId : ids , IndexSpec : & x . spec , } , } res := & pb . DeleteDocumentResponse { } if err := internal . Call ( c , " " , " " , req , res ) ; err != nil { return err } if len ( res . Status ) != len ( ids ) { return fmt . Errorf ( " " , len ( res . Status ) , len ( ids ) ) } multiErr , hasErr := make ( appengine . MultiError , len ( ids ) ) , false for i , s := range res . Status { if s . GetCode ( ) != pb . SearchServiceError_OK { multiErr [ i ] = fmt . Errorf ( " " , s . GetCode ( ) , s . GetErrorDetail ( ) ) hasErr = true } } if hasErr { return multiErr } return nil }
// DeleteMulti deletes multiple documents from the index.
//
// The returned error may be an instance of appengine.MultiError, in which case
// it will be the same size as srcs and the individual errors inside will
// correspond with the items in srcs.
DeleteMulti deletes multiple documents from the index . The returned error may be an instance of appengine . MultiError in which case it will be the same size as srcs and the individual errors inside will correspond with the items in srcs .