Created
August 18, 2016 11:53
-
-
Save nanlabsweb/a21fc7c120581f2eadb8980a7abd6c47 to your computer and use it in GitHub Desktop.
POST - Index metadata.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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