本文整理汇总了Java中org.elasticsearch.action.admin.indices.close.CloseIndexRequestBuilder类的典型用法代码示例。如果您正苦于以下问题:Java CloseIndexRequestBuilder类的具体用法?Java CloseIndexRequestBuilder怎么用?Java CloseIndexRequestBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CloseIndexRequestBuilder类属于org.elasticsearch.action.admin.indices.close包,在下文中一共展示了CloseIndexRequestBuilder类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: closeIndex
import org.elasticsearch.action.admin.indices.close.CloseIndexRequestBuilder; //导入依赖的package包/类
public CloseIndexResponse closeIndex(final String index,
final BuilderCallback<CloseIndexRequestBuilder> builder) {
final CloseIndexResponse actionGet = builder
.apply(client().admin().indices().prepareClose(index)).execute()
.actionGet();
if (!actionGet.isAcknowledged()) {
onFailure("Failed to close " + index + ".", actionGet);
}
return actionGet;
}
示例2: prepareClose
import org.elasticsearch.action.admin.indices.close.CloseIndexRequestBuilder; //导入依赖的package包/类
@Override
public CloseIndexRequestBuilder prepareClose(String... indices) {
return new CloseIndexRequestBuilder(this, CloseIndexAction.INSTANCE, indices);
}
示例3: prepareClose
import org.elasticsearch.action.admin.indices.close.CloseIndexRequestBuilder; //导入依赖的package包/类
/**
* Closes one or more indices based on their index name.
*
* @param indices The name of the indices to close
*/
CloseIndexRequestBuilder prepareClose(String... indices);