RethinkDB Map / Reduce示例

时间:2015-06-13 13:12:11

标签: rethinkdb

我在RethinkDB文档中运行Map / Reduce示例。我有一些看起来像这样的文件:

{
"category":  "Fiction" ,
"content":  "This far, no further!" ,
"id":  "0fc5339b-8139-4996-8979-88a0051195e3" ,
"title":  "The line must be drawn here"
}

当我使用Data Explorer跟踪示例时。 e.g。

r.table('posts').map(lambda post: 1)

我收到此错误:

SyntaxError: missing ) after argument list

1 个答案:

答案 0 :(得分:0)

这是因为Data Explorer只允许JavaScript作为输入。你需要切换到这样的东西才能使它工作:

r.table('posts').map(function(post){return 1})
相关问题