Skip to content

Instantly share code, notes, and snippets.

@nanlabsweb
Created August 18, 2016 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanlabsweb/a21fc7c120581f2eadb8980a7abd6c47 to your computer and use it in GitHub Desktop.
Save nanlabsweb/a21fc7c120581f2eadb8980a7abd6c47 to your computer and use it in GitHub Desktop.
POST - Index metadata.
void indexAll() {
elasticSearchHelper.withElasticSearch { Client client ->
MyDomainClass.list().each { MyDomainClass instance ->
client.index {
index "myIndex"
type "myDomainClass"
id instance.id
source instance
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment