Search Errors don't seem to be in a usable format
For example, given this sample code:
r, a, b, e := riakClient.Search(&riak.Search{Q: query, Index: "invites"})
if e != nil {
println(e)
}
with a junk query Dolphins:1 AND Forks:
displays the following error:
(0x6cee80,0xc210098210)
Given that the empty querystring after Forks is not valid (I think), it should output something more to that effect. The command-line search client outputs something like 'badmatch'.
It's very strange, but it seems to have something to do with println. If I use fmt.Printf instead it returns a more complete error.
fmt.Printf("%v\n", e)
Error processing incoming message: error:{badmatch,
{error,
{lucene_parse,
"syntax error before: "}}}:[{riak_search_client,
parse_query,
...
Println prints the same as %v except in some cases, including errors: http://golang.org/pkg/fmt/
I think perhaps that somewhere in Request or Response an error object is created in an unusual way. I couldn't figure out where. https://github.com/tpjg/goriakpbc/blob/master/client.go#L196