Ruby driver for RethinkDB
Questions tagged [rethinkdb-ruby]
17 questions
                    
                    8
                    
            votes
                
                2 answers
            
        RethinkDB multiple queries in a single request
I'm trying to execute several RQL commands in a single request to server, without much success I may add. I have tried r.union, but it only works with sequences. What I really want:
[r.db(..).table(..).get(id1).delete(),
…
         
    
    
        PJK
        
- 2,082
- 3
- 17
- 28
                    4
                    
            votes
                
                2 answers
            
        Can RethinkDB hold more than a few hundred embedded arrays?
At http://www.rethinkdb.com/docs/data-modeling/, states:
Because of the previous limitation, it's best to keep the size of the
  posts array to no more than a few hundred documents.
If I intend on keeping 90 days (3 months) of statistics, and its…
         
    
    
        Christian Fazzini
        
- 19,613
- 21
- 110
- 215
                    2
                    
            votes
                
                2 answers
            
        Get a collection and then changes to it without gaps or overlap
How do I reliably get the contents of a table, and then changes to it, without gaps or overlap? I'm trying to end up with a consistent view of the table over time.
I can first query the database, and then subscribe to a change feed, but there might…
         
    
    
        Tinco
        
- 597
- 3
- 14
                    2
                    
            votes
                
                1 answer
            
        How do we OR filters using rethinkdb and nobrainer in ruby on rails?
Following the nobrainer docs here:  http://nobrainer.io/docs/querying/
I am trying to do an OR query, to look for articles where a keyword matches the title or text fields...
The following query returns no results...          
 s = 'something'
…
         
    
    
        vanboom
        
- 1,274
- 12
- 20
                    2
                    
            votes
                
                2 answers
            
        Possible to return multiple results with reduce function?
With the following schema (defined below). I can use map reduce to aggregate the delivered_count field for all days (which is an embedded array inside the campaign document).
  {
    campaign_id: 1,
    status: 'running',
    dates: {
     …
         
    
    
        levelone
        
- 2,289
- 3
- 16
- 17
                    1
                    
            vote
                
                1 answer
            
        How to get many documents from RethinkDB by array of ids?
I have array of ids
ids = [1, 2, 3, 4, ...] #1000 ids
How I can use this function:
r.table("users").get_all(1, 2, 3, 4, ..1000 ids.., index: "id")
I can use 
r.table("users").filter{ |doc| r.expr(ids).contains(doc["id"])}
But it is too slow on DB…
         
    
    
        Alexander Nikolaev
        
- 23
- 5
                    1
                    
            vote
                
                1 answer
            
        starting rethinkdb in commandline doesn't coming back to shell prompt
I need to change the server_name of a running rethinkdb instance. I have stopped the server and update the /etc/rethinkdb/instances.d/default.conf file and then removed the metadata & rethinkdb_data from /var/lib/rethinkdb/default/data location. …
         
    
    
        suru1432002
        
- 143
- 2
- 8
                    1
                    
            vote
                
                1 answer
            
        Using Ruby Driver to create a complicated query in Rethinkdb's Reql
I am using the ruby driver for rethink db and I am running into some problem with nested elements that has arrays.
I have my data structured like this
[{"family_name"=>"Adam"},
 {"family_name"=>"Bobby"},
 {"family_name"=>"Crissy",
  "groups"=>
  …
         
    
    
        noobiehacker
        
- 1,099
- 2
- 12
- 24
                    1
                    
            vote
                
                1 answer
            
        RethinkDB REQL Query to find number occurrences of distinct values in an array
I have a table like this in rethinkDB.
[{
    "Id": [
        12,
        13
    ],
    "group": "79",
    "go_Id": []
}, {
    "Id": [
        12,
        12,
        12,
        14
        14
    ],
    "group": "91",
    "go_Id": [
        16,
  …
         
    
    
        custosat
        
- 99
- 8
                    1
                    
            vote
                
                1 answer
            
        Multidatacenter Replication with Rethinkdb
I have two servers in two different geographic locations (alfa1 and alfa2).
r.tableCreate('dados', {shards:1, replicas:{alfa1:1, alfa2:1}, primaryReplicaTag:'alfa1'})
I need to be able to write for both servers, but when I try to shutdown alfa1, and…
         
    
    
        Carlos
        
- 51
- 1
- 1
                    1
                    
            vote
                
                1 answer
            
        Rethink DB Cross Cluster Replication
I have 3 different pool of clients in 3 different geographical locations.
I need configure Rethinkdb with 3 different clusters and replicate data between the (insert, update and deletes). I do not want to use shard, only replication.
I didn't found…
         
    
    
        Carlos
        
- 51
- 1
- 1
                    1
                    
            vote
                
                1 answer
            
        How can i update the ids field with this rethinkdb document structure?
Having trouble trying to update the ids field in the document structure: 
[
    [0] {
                   "rank" => nil,
             "profile_id" => 3,
        "daily_providers" => [
            [0] {
                "relationships" => [
           …
         
    
    
        Christian Fazzini
        
- 19,613
- 21
- 110
- 215
                    0
                    
            votes
                
                1 answer
            
        Get RethinkDB query working in Ruby on Rails
I have a ReQL query...
r.db('development').table('responses').filter({
  survey_id: 9
}).concatMap(r.row.getField('numerical_answers')).filter({
  type: 'CustomerEffortAnswer'
}).sum('number')
...that I would like to get working in NoBrainer…
         
    
    
        Tyler C
        
- 531
- 1
- 5
- 12
                    0
                    
            votes
                
                1 answer
            
        Is there a way to query the closest locations on a filter in RethinkDB?
Currently, the Rethink API documentation says that the get_nearest command only works on a table. Ofcourse I can filter the results afterwards, but that seems inefficient, plus that requires to have all the items sorted by distance when I want to…
         
    
    
        Fritzz
        
- 656
- 6
- 27
                    0
                    
            votes
                
                2 answers
            
        How can I force close open connections in RethinkDB?
I have problems with my open connections with RethinkDB. If errors occur in my Sinatra back-end app methods, the connection with Rethink is not closed. Therefore the number of open connections slowly increases.
This results in too many open…
         
    
    
        Fritzz
        
- 656
- 6
- 27