-
Notifications
You must be signed in to change notification settings - Fork 3
/
client_search.go
64 lines (46 loc) · 1.9 KB
/
client_search.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package riago
// Perform a Riak Search Query request.
func (c *Client) SearchQuery(req *RpbSearchQueryReq) (resp *RpbSearchQueryResp, err error) {
prof := NewProfile("search_query", string(req.GetIndex()))
defer c.instrument(prof, err)
resp = &RpbSearchQueryResp{}
err = c.do(MsgRpbSearchQueryReq, req, resp, prof)
return
}
// Perform a Riak Yokozuna Index Get request.
func (c *Client) YokozunaIndexGet(req *RpbYokozunaIndexGetReq) (resp *RpbYokozunaIndexGetResp, err error) {
prof := NewProfile("yokozuna_index_get", string(req.GetName()))
defer c.instrument(prof, err)
resp = &RpbYokozunaIndexGetResp{}
err = c.do(MsgRpbYokozunaIndexGetReq, req, resp, prof)
return
}
// Perform a Riak Yokozuna Index Put request.
func (c *Client) YokozunaIndexPut(req *RpbYokozunaIndexPutReq) (err error) {
prof := NewProfile("yokozuna_index_put", string(req.GetIndex().GetName()))
defer c.instrument(prof, err)
err = c.do(MsgRpbYokozunaIndexPutReq, req, nil, prof)
return
}
// Perform a Riak Yokozuna Index Delete request.
func (c *Client) YokozunaIndexDelete(req *RpbYokozunaIndexDeleteReq) (err error) {
prof := NewProfile("yokozuna_index_delete", string(req.GetName()))
defer c.instrument(prof, err)
err = c.do(MsgRpbYokozunaIndexDeleteReq, req, nil, prof)
return
}
// Perform a Riak Yokozuna Index Get request.
func (c *Client) YokozunaSchemaGet(req *RpbYokozunaSchemaGetReq) (resp *RpbYokozunaSchemaGetResp, err error) {
prof := NewProfile("yokozuna_schema_get", string(req.GetName()))
defer c.instrument(prof, err)
resp = &RpbYokozunaSchemaGetResp{}
err = c.do(MsgRpbYokozunaSchemaGetReq, req, resp, prof)
return
}
// Perform a Riak Yokozuna Schema Put request.
func (c *Client) YokozunaSchemaPut(req *RpbYokozunaSchemaPutReq) (err error) {
prof := NewProfile("yokozuna_schema_put", string(req.GetSchema().GetName()))
defer c.instrument(prof, err)
err = c.do(MsgRpbYokozunaSchemaPutReq, req, nil, prof)
return
}