Skip to content

Instantly share code, notes, and snippets.

@aweiland
Created April 1, 2016 13:05
Show Gist options
  • Save aweiland/180f57e59e89a7da2e5b35e4fad47a69 to your computer and use it in GitHub Desktop.
Save aweiland/180f57e59e89a7da2e5b35e4fad47a69 to your computer and use it in GitHub Desktop.
map into a rethink embedded doc to create index
r.db(Rethink.DB).table(Rethink.SOCIAL_USER_TABLE)
.indexCreate(Rethink.USER_APPID_PROVIDER_PROVIDERID_IDX,
user -> user.g("credentials").map(
c -> r.array(user.g("appId"), c.g("provider"), c.g("providerId"))
))
.optArg("multi", true).run(connection);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment