RethinkDB Map/Reduce 个例子
RethinkDB Map/Reduce examples
我 运行 通过 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 遵循示例时。例如
r.table('posts').map(lambda post: 1)
我收到这个错误:
SyntaxError: missing ) after argument list
这是因为数据资源管理器只允许 JavaScript 作为输入。你需要切换到这样的东西才能让它工作:
r.table('posts').map(function(post){return 1})
我 运行 通过 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 遵循示例时。例如
r.table('posts').map(lambda post: 1)
我收到这个错误:
SyntaxError: missing ) after argument list
这是因为数据资源管理器只允许 JavaScript 作为输入。你需要切换到这样的东西才能让它工作:
r.table('posts').map(function(post){return 1})