RE: What is the best way to do "AND / OR" queries across data items across one or more buckets Riak? Seconday indexes, Solr, mutiple map phases, etc? Is this advice different prior to 1.0?
How about performing a search across different buckets? Is it possible? if so... would it be link-walking? Map-Reduce? From: kevburn...@gmail.com Date: Sun, 2 Oct 2011 03:34:31 -0700 Subject: Re: What is the best way to do "AND / OR" queries across data items across one or more buckets Riak? Seconday indexes, Solr,mutiple map phases, etc? Is this advice different prior to 1.0? To: harshal.d...@solutionset.com CC: riak-users@lists.basho.com What up Harshal, Since at least 0.13.x, the solr interface has supported both AND and OR queries just fine, even in combination. {a: "foo"}{a: "bar"} {a: ["foo", "bar"]}{a: "bar baz"} curl "http://localhost:8098/solr/bucket_name/select?wt=json&q=a:foo+OR+a:bar"; (4 results) curl "http://localhost:8098/solr/bucket_name/select?wt=json&q=a:foo+AND+a:bar"; (1 result) curl "http://localhost:8098/solr/bucket_name/select?wt=json&q=a:foo+AND+(a:bar+OR+a:baz)" (2 results)- Kev c: +001 (650) 521-7791 On Wed, Sep 28, 2011 at 11:19 AM, Harshal Dhir wrote: Hi, We were wondering what is the best possible way to perform "AND / OR" queries in RiakSearch. It seems OR works but how do I perform an AND on the same field. For example: DATA: {a : "test" } {a: "test"} {a: "test2"} "test" OR "test2" would return both. But, we are looking to return AND query result, since obviously "test2" AND "test" won't return anything. So, we are looking for guidance on how do we store data in such a way that AND queries would be possible. Whats the best recommended approach both prior to 1.0 and 1.0 going forward. ThanksHarshal ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Searching across multiple buckets
Is it possible? How do we do it? ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
RE: Searching across multiple buckets
Yeah, I thought so... it would be nice though to be able to search across different buckets. i.e. lookup services for equities across different investment universes etc. Date: Mon, 3 Oct 2011 22:37:44 -0400 Subject: Re: Searching across multiple buckets From: jeff.kirk...@gmail.com To: roberto_cal...@hotmail.com CC: riak-users@lists.basho.com Roberto, I do not believe this is possible through a single call because you need to explicitly define the bucket to search in and it does not (at least that I have seen) accept an array or list of buckets. That said, I guess you could do something that makes several calls but that is not what you really want to do. Jeff On Mon, Oct 3, 2011 at 8:54 PM, Roberto Calero wrote: Is it possible? How do we do it? ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
RE: Searching across multiple buckets
I don't think so... unless you know a way which I'm not aware of... > Date: Mon, 3 Oct 2011 23:25:52 -0500 > Subject: Re: Searching across multiple buckets > From: lesmikes...@gmail.com > To: roberto_cal...@hotmail.com > CC: jeff.kirk...@gmail.com; riak-users@lists.basho.com > > On Mon, Oct 3, 2011 at 10:06 PM, Roberto Calero > wrote: > > Yeah, I thought so... it would be nice though to be able to search across > > different buckets. i.e. lookup services for equities across different > > investment universes etc. > > > > Can't the map step of a m/r expand a list of buckets for you - with > the reduce returning the values? > > -- > Les Mikesell > lesmikes...@gmail.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
riak-admin test | problems
I'm able to start riak (riak start) and execute riak-admin status, which dumps lots of info about the local node... BUT when running riak-admin test, I always get the following: Attempting to restart script through sudo -u riakFailed to read test value: {error,{insufficient_vnodes,0,need,1} Is it something wrong with the installation? Haven't been able to get much info on the net Cheers ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
RE: Unable to access solr port.
http://:8098/solr/ Date: Thu, 20 Oct 2011 13:46:18 +0530 Subject: Unable to access solr port. From: forgetvi...@gmail.com To: riak-users@lists.basho.com Hi, I installed riaksearch-0.14 version and I am able to define schema and query records with command line interface (search-cmd). But I am facing issue when I try to query the records with solr interface. "curl http://:8098/solr/bucketname?q=" returns the following response 404 Not FoundNot FoundThe requested document was not found on this server.mochiweb+webmachine web server and "curl http://:8098/" returns the following response riak_kv_wm_link_walkerriak_kv_wm_mapredriak_kv_wm_pingriak_kv_wm_rawriak_kv_wm_stats. Is there any configuration entry that I am missing to enable "solr" interface. Kindly help me out. Thanks, Vijay. ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
RE: Unable to access solr port.
You're right... yours is the right url. I guess my fingers were too fast in hitting the send button. Date: Thu, 20 Oct 2011 09:07:35 -0700 Subject: Re: Unable to access solr port. From: d...@basho.com To: roberto_cal...@hotmail.com CC: forgetvi...@gmail.com; riak-users@lists.basho.com Hi Roberto, Can you try appending '/select' after the bucket name? For example: curl "http://localhost:8098/solr/books/select?start=0&rows=1&q=prog*"; I found the above query in the Riak Search documentation here:http://wiki.basho.com/Riak-Search---Querying.html Thanks, Dan Daniel Reverri Developer Advocate Basho Technologies, Inc. d...@basho.com On Thu, Oct 20, 2011 at 1:19 AM, Roberto Calero wrote: http://:8098/solr/ Date: Thu, 20 Oct 2011 13:46:18 +0530 Subject: Unable to access solr port. From: forgetvi...@gmail.com To: riak-users@lists.basho.com Hi, I installed riaksearch-0.14 version and I am able to define schema and query records with command line interface (search-cmd). But I am facing issue when I try to query the records with solr interface. "curl http://:8098/solr/bucketname?q=" returns the following response 404 Not FoundNot FoundThe requested document was not found on this server.mochiweb+webmachine web server and "curl http://:8098/" returns the following response riak_kv_wm_link_walkerriak_kv_wm_mapredriak_kv_wm_pingriak_kv_wm_rawriak_kv_wm_stats. Is there any configuration entry that I am missing to enable "solr" interface. Kindly help me out. Thanks, Vijay. ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
RE: Unable to access solr port.
Did you enable the bucket to be indexed? Date: Thu, 20 Oct 2011 22:41:56 +0530 Subject: Re: Unable to access solr port. From: forgetvi...@gmail.com To: d...@basho.com CC: roberto_cal...@hotmail.com; riak-users@lists.basho.com Hi Dan, Appending with select also doesn't help. "curl http://:8098/solr//select?q=" returns the following response 404 Not FoundNot FoundThe requested document was not found on this server.mochiweb+webmachine web server Regards, Vijay. On Thu, Oct 20, 2011 at 9:37 PM, Dan Reverri wrote: Hi Roberto, Can you try appending '/select' after the bucket name? For example: curl "http://localhost:8098/solr/books/select?start=0&rows=1&q=prog*"; I found the above query in the Riak Search documentation here:http://wiki.basho.com/Riak-Search---Querying.html Thanks, Dan Daniel Reverri Developer Advocate Basho Technologies, Inc. d...@basho.com On Thu, Oct 20, 2011 at 1:19 AM, Roberto Calero wrote: http://:8098/solr/ Date: Thu, 20 Oct 2011 13:46:18 +0530 Subject: Unable to access solr port. From: forgetvi...@gmail.com To: riak-users@lists.basho.com Hi, I installed riaksearch-0.14 version and I am able to define schema and query records with command line interface (search-cmd). But I am facing issue when I try to query the records with solr interface. "curl http://:8098/solr/bucketname?q=" returns the following response 404 Not FoundNot FoundThe requested document was not found on this server.mochiweb+webmachine web server and "curl http://:8098/" returns the following response riak_kv_wm_link_walkerriak_kv_wm_mapredriak_kv_wm_pingriak_kv_wm_rawriak_kv_wm_stats. Is there any configuration entry that I am missing to enable "solr" interface. Kindly help me out. Thanks, Vijay. ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
unsubscribe
From: jeremiah.pesc...@gmail.com Date: Wed, 25 Jan 2012 06:48:45 -0800 Subject: Re: Should Riak have used dedicated nodes for secondary indices? To: runar.jord...@gmail.com CC: riak-users@lists.basho.com Good news! Riak doesn't use sharding. Data locality is critical in a distributed system. When you create an index, your structure looks something like: indexed_value:record_id Reading from an index requires locating indexed_value, finding all matching values, and then retrieving all matching record_ids. By keeping index data on the same node as the source data, Riak avoids having to remote the query to retrieve object data. This is a Good Thing. The network is slow and unreliable. Just ask an Australian. Riak's approach is intended to provide a uniform system where you can treat any node equally. The idea that there should be an unsharded index node is a bit ludicrous. Let's say you have 1TB of raw data. Your indexes are pretty light and are only about 20% of your data size. This means that you need 200GB of good storage (not some cheap $150 SATA HDD you found on NewEgg). 200GB of RAID 10 SAS storage isn't that pricey to put in a single unsharded machine. Over time as your data grows and your indexing changes, you may have 10TB and your index size is ~40% of your data. Your unsharded index server now has to have 4TB of fast, reliable storage. And, since this is an unsharded system, you'll want multiple replicas of your unsharded index server to make sure that a hardware hiccup doesn't take down your ability to perform fast lookups. Besides - a single indexing server becomes a single bottleneck and a single point of failure in your system. Most people using Lucene as their indexing store are sharding Lucene. From an anecdotal standpoint, about 70% of the people I've talked to using Lucene are getting to the point of sharding their replicated Lucene indexes. I'm not saying that either approach is good or bad; just remember that every solution has drawbacks.--- Jeremiah Peschka, SQL Server MVP Managing Director, Brent Ozar PLF, LLC On Wed, Jan 25, 2012 at 5:15 AM, Runar Jordahl wrote: Siddharth Anand, says that secondary indices (for a key-value store) best is placed on a separate node, avoiding the need to look up 1 / N nodes during a query: "Systems that shard data based on a primary key will do well when routed by that key. When routed by a secondary key, the system will need to “spray” a query across all shards. If one of the shards is experiencing high latency, the system will return either no results or incomplete (i.e. inconsistent) results. For this reason, it would make sense to store the secondary index on an unsharded (but replicated) system." http://highscalability.com/blog/2012/1/24/the-state-of-nosql-in-2012.html If I understand Riak correctly, it takes the opposite approach, storing secondary indices together with the data. To me at appears like Riak’s approach gives a more uniform system, with all nodes having the same responsibilities. Does anyone else have any thoughts on this? Kind regards Runar Jordahl blog.epigent.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com