0

There seems to be a bit of problem when doing riak search, using Java Riak Client,

val result = client.mapReduce(BUCKET_NAME, searchHead + ":" + userID)
        .addMapPhase(new NamedJSFunction("Riak.mapValuesJson"), true)
        .execute

Here, the userID is a twitter ID is , and the problem is that userID="-xxxxxx", you can see there is a "-".

And for some reason, when fields start with "-", the search doesn't return any result.

I am using Riak Java Client 1.1.4, and Riak version is 1.3.1

mane
  • 1,149
  • 16
  • 41
  • In the query, doesn't a value starting with `-` indicate exclusion? Does it behave differently if you escape the first character with `\\` – Joe Jun 30 '14 at 15:02
  • @joe Well, newbie to riak here and sorry for the late reply, I didn't know that `-` was used for exclusions. I haven't tried escaping the first character yet, could you please be a bit more specific about how to do so?? – mane Jul 01 '14 at 16:44
  • I'm suggesting prepend a backslash ` \ ` to the userID when it starts with a `-` – Joe Jul 01 '14 at 18:07

0 Answers0