6 Admin - Reference Documentation
Authors: Noam Y. Tenne, Manuarii Stein, Stephane Maldini, Serge P. Nekoval, Marcos Carceles
Version: 0.0.4.6
6 Admin
The plugin implements a few convenience methods for a few admin-oriented actions.6.1 Refresh
Explicitly refresh one or more index, making all operations performed since the last refresh available for search. It will also flush the current IndexRequestQueue if there are pending index or delete requests from the application side. The refresh method is not asynchronous, meaning that it will wait for all operations to complete before resuming the execution of your application.elasticSearchService.index(domain) // Some code… // … elasticSearchService.index(domain2) // Some code… // … elasticSearchService.index(domain3)// Some code… // … elasticSearchAdminService.refresh() // Ensure that the 3 previous index requests have been made searchable by ES
6.2 Delete Index
Delete an index, all its mapping and its content from the ElasticSearch instance. Be careful when using this command because it cannot be undone. Note that the generated mapping from the grails plugin is also deleted.The method can be limited to one or more specific indices or applied to all indices at once (called with no parameter).elasticSearchAdminService.deleteIndex()