Using UUID as keys is problematic for Riak Search

2014-08-10 Thread David James
I'm using UUIDs for keys in Riak -- converted to bytes, not UTF-8 strings. (I'd rather spend 16 bytes for each key, not 36.) As I understand it, Yokozuna maps the Riak key to _yz_id. Here is the suggested schema from the documentation: Would you expect this to work with Riak Search? I would

Re: Using UUID as keys is problematic for Riak Search

2014-08-10 Thread Eric Redmond
You're correct that yokozuna only supports utf8, because the Solr interface only supports utf8 (note that the failure happens when attempting to build a non-utf8 JSON add document command). There's not much we can do here at the moment, since we've yet to (if ever) support a custom interface to Sol

Re: Using UUID as keys is problematic for Riak Search

2014-08-10 Thread Jason Campbell
I like UUIDs for everything as well, although I expected compatibility issues with something. Base 64 encoding the binary value is a nice compromise for me, and takes 22 characters (if you drop the padding) instead of the usual 36 for the hyphenated hex format.It would still require re encoding all

Riak solr query range issue

2014-08-10 Thread tele
Hi, I have a simple solr document like this: Oslo Bob 34 As "id" i use an email addr added to a 'users' index. I've defined age as Int field. I can now query the index with: # search-cmd search users "name:Bob" :: Searching

Re: Using UUID as keys is problematic for Riak Search

2014-08-10 Thread David James
Thanks for the quick responses. Eric: I don't understand. Why does Solr have the UUIDField ( http://lucene.apache.org/solr/4_7_0/solr-core/org/apache/solr/schema/UUIDField.html) if it were not indexable? What is the nature of the limitation? Jason: Thanks, I will consider Base 64 encoding. On S

Re: Using UUID as keys is problematic for Riak Search

2014-08-10 Thread Eric Redmond
You're expected to base 64 encode it. UUID is simply the kind of value it expects, like a date or an integer. Eric Redmond, Engineer @ Basho On Sun, Aug 10, 2014 at 5:03 PM, David James wrote:Thanks for the quick responses.Eric: I don't understand. Why does Solr have the UUI

Re: Using UUID as keys is problematic for Riak Search

2014-08-10 Thread Eric Redmond
I'm at my laptop now so I can talk a bit more about it. Don't conflate the value type with the encodings. UUID is a field type, just like how dates or integers are field types. They explain to the Solr indexer how to reason about the value it gets. The field type string "201408

Re: Using UUID as keys is problematic for Riak Search

2014-08-10 Thread David James
ld types. They explain to the Solr > indexer how to reason about the value it gets. The field type string > "20140810" is encoded differently than the integer value 20140810 or Date > "20140810". This is important for the queries you can build, as a date > ra