Questions tagged [rethinkdb]

RethinkDB is a scalable, open-source, distributed database system built to store JSON documents. It features a query language that has useful queries like table joins and group by, a highly parallelized architecture, and web tools for managing clusters.

RethinkDB is a scalable, open-source, distributed database system built to store JSON documents. It features a query language that has useful queries like table joins and group by, a highly parallelized architecture, and web tools for managing clusters.

Programming model:

  • JSON data model and immediate consistency
  • Distributed joins, subqueries, aggregation, atomic updates
  • Hadoop-style map/reduce
  • Secondary, compound, and arbitrarily computed indexes.

Administration:

  • Web and command-line adminstration tools
  • Tools to handle machine failure and network interrupts
  • Multi-datacenter replication and failover

Scalability:

  • Sharding and replication to multiple nodes
  • Automatically parallelized and distributed queries
  • Lock-free operation via MVCC concurrency

Useful Links:

Books:

1436 questions
0
votes
1 answer

How I do multiple eq_joins?

I'm trying to do multiple eq_joins. The error I get is: ReqlQueryLogicError: Primary keys must be either a number, string, bool, pseudotype or array (got type OBJECT): { "First name": "John", "Last name": "Urquhart", …
Tim Clemans
  • 176
  • 1
  • 1
  • 7
0
votes
0 answers

RethinkDB Handling update of nested objects

I am using RethinkDB, and my rows have nested objects. If a field is a value, I want it overwritten, however, if it is a an array, I want to the old and new values to be concatenated. Thus, for a nested, object, I want the same behavior. I was…
Gakho
  • 603
  • 1
  • 9
  • 18
0
votes
1 answer

How to perform complex bulk update in RethinkDB

I am trying to periodically calculate complex top score for all items in post table. const {log10, max, abs, round} = Math; const topScore = post => { // from Reddit const {score, createdAt} = post; const order = log10(max(abs(score), 1)); …
Joon
  • 9,346
  • 8
  • 48
  • 75
0
votes
1 answer

rethinkdb update nested array

I have the following structure: { "id": "3065e957-56e9-4084-8e32-bb4de8d9265a", "id_service": "570b4abe-70fe-44e0-845e-74eb60081fc4", "tweets": [ { "created_at": "2013-10-13 00:58:11", "id_tweet":…
Gabriel M
  • 3
  • 2
0
votes
0 answers

How do I deploy a node js app with rethinkdb?

I've never deployed an app before so I'm completely lost. If anyone can help or point me to a resource I can use, that would be much appreciated. If there is other information I need to provide, please let me know. I would like to get this done in…
jackjoesmith
  • 951
  • 4
  • 20
  • 33
0
votes
1 answer

Filter nested fields in RethinkDB rows based on multiple values

I have below json in RethinkDB table [{"pid": 0, "sk": [ { "sid": 30, "et": 3 }, { "sid": 22, "et": 10 }, { "sid": 30, "et": 10 } ], "wc": [ { "wid": 29, "et": 8 }, { "wid": 30, "et": 2 …
Satheesh Panduga
  • 818
  • 2
  • 13
  • 32
0
votes
1 answer

RethinkDB: count unique rows within grouped data

I'm trying to count all unique rows within grouped data, i.e, how many unique rows exist within each group. Although groupedData.distinct().count() works for relatively small amounts of rows, running it on ~200k rows, such as in my case, ends with…
Kludge
  • 2,653
  • 4
  • 20
  • 42
0
votes
1 answer

RethinkDB: does reduce iterate all grouped data?

I thought I had it with rethinkdb :) but now I'm a bit confused - for this query, counting grouped data: groupedRql.count() I'm getting the expected results (numbers): [{"group": "a", "reduction": 41}, {"group": "b", "reduction": 39}...] all…
Kludge
  • 2,653
  • 4
  • 20
  • 42
0
votes
1 answer

RethinkDB index query with several .contains()

I have the following query that works fine but is slow, however I can't figure out how to index it properly: r.db('my_db') .table('messages') .filter({ community_id : community.id}) .filter(function(row){ return…
jesperado
  • 25
  • 3
0
votes
1 answer

How do you do math operations on r.now()

I am implementing an express session with rethinkdb and I have an 'expires' field that is calculated as so: r.now() + 24 * 60 * 60 * 1000 (1 day from now). Can I do something like this? r.now().add(millisecondsToAdd) There is no api documentations…
Joon
  • 9,346
  • 8
  • 48
  • 75
0
votes
1 answer

Which tables to store relational IDs in for joins (for best practice/efficiency)

I'm a developer with limited experience of DB architecture. I just started to rough up what my DB for rethinkdb should look like and I came up with something like this: User Project IDs (including access level) ... Project Or should this have…
Dominic
  • 62,658
  • 20
  • 139
  • 163
0
votes
1 answer

RethinkDB: Loading A NodeJS package inside r.js method

I am not sure is it possible or not. I need to use a t-distribution in my ReQL from a nodeJS Package. The code is something like this: Query.map(function(doc){ return { 'DesScore': r.do(doc('MXt'), …
0
votes
1 answer

Populate array of keys while joining with RethinkDb

I wasn't able to populate a list of keys while joining on an other table so I was wondering if my models are correct and if what I'm trying to do is possible with Thinky, here is my code: Group model var Group = thinky.createModel('group', { …
Ouad
  • 33
  • 1
  • 5
0
votes
1 answer

Update arrays while Iterating through a table

I'm trying to update multiple arrays inside the table users.I think I'm supposed to use forEach for nested queries, but can't make it work. Below is what I tried: r.db('mydb').table('users').forEach( function(user){ return update({ …
João Lima
  • 430
  • 1
  • 6
  • 11
0
votes
1 answer

React Redux Falcor and RethinkDB boilerplate

Anyone who has worked on these stack (React Redux Falcor and RethinkDB boilerplate) has a boilerplate. Please share it.
Hari
  • 383
  • 1
  • 3
  • 9