本文整理汇总了Java中org.elasticsearch.rest.RestController类的典型用法代码示例。如果您正苦于以下问题:Java RestController类的具体用法?Java RestController怎么用?Java RestController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RestController类属于org.elasticsearch.rest包,在下文中一共展示了RestController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RestSearchAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
@Inject
public RestSearchAction(Settings settings, RestController controller, Client client) {
super(settings, controller, client);
controller.registerHandler(GET, "/_search", this);
controller.registerHandler(POST, "/_search", this);
controller.registerHandler(GET, "/{index}/_search", this);
controller.registerHandler(POST, "/{index}/_search", this);
controller.registerHandler(GET, "/{index}/{type}/_search", this);
controller.registerHandler(POST, "/{index}/{type}/_search", this);
controller.registerHandler(GET, "/_search/template", this);
controller.registerHandler(POST, "/_search/template", this);
controller.registerHandler(GET, "/{index}/_search/template", this);
controller.registerHandler(POST, "/{index}/_search/template", this);
controller.registerHandler(GET, "/{index}/{type}/_search/template", this);
controller.registerHandler(POST, "/{index}/{type}/_search/template", this);
RestExistsAction restExistsAction = new RestExistsAction(settings, controller, client);
controller.registerHandler(GET, "/_search/exists", restExistsAction);
controller.registerHandler(POST, "/_search/exists", restExistsAction);
controller.registerHandler(GET, "/{index}/_search/exists", restExistsAction);
controller.registerHandler(POST, "/{index}/_search/exists", restExistsAction);
controller.registerHandler(GET, "/{index}/{type}/_search/exists", restExistsAction);
controller.registerHandler(POST, "/{index}/{type}/_search/exists", restExistsAction);
}
示例2: RestIndexPutAliasAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
@Inject
public RestIndexPutAliasAction(Settings settings, RestController controller, Client client) {
super(settings, controller, client);
controller.registerHandler(PUT, "/{index}/_alias/{name}", this);
controller.registerHandler(PUT, "/_alias/{name}", this);
controller.registerHandler(PUT, "/{index}/_aliases/{name}", this);
controller.registerHandler(PUT, "/_aliases/{name}", this);
controller.registerHandler(PUT, "/{index}/_alias", this);
controller.registerHandler(PUT, "/_alias", this);
controller.registerHandler(POST, "/{index}/_alias/{name}", this);
controller.registerHandler(POST, "/_alias/{name}", this);
controller.registerHandler(POST, "/{index}/_aliases/{name}", this);
controller.registerHandler(POST, "/_aliases/{name}", this);
controller.registerHandler(PUT, "/{index}/_aliases", this);
//we cannot add POST for "/_aliases" because this is the _aliases api already defined in RestIndicesAliasesAction
}
示例3: ESAuthPluginAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
@Inject
public ESAuthPluginAction(Settings settings, RestController controller, Client client) {
super(settings, controller, client);
Environment environment = new Environment(settings);
this.config = ESAuthConfig.getInstance(environment);
controller.registerHandler(RestRequest.Method.GET, "/_auth/config_reload", this);
controller.registerHandler(RestRequest.Method.GET, "/_auth/config_show", this);
}
示例4: RestMarketRecordUpdateAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
@Inject
public RestMarketRecordUpdateAction(Settings settings, RestController controller, Client client, RestSecurityController securityController,
MarketService service) {
super(settings, controller, client, securityController,
MarketIndexDao.INDEX, MarketRecordDao.TYPE,
(id, json) -> service.updateRecordFromJson(id, json));
}
示例5: RestMultiSearchTemplateAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
public RestMultiSearchTemplateAction(Settings settings, RestController controller) {
super(settings);
this.allowExplicitIndex = MULTI_ALLOW_EXPLICIT_INDEX.get(settings);
controller.registerHandler(GET, "/_msearch/template", this);
controller.registerHandler(POST, "/_msearch/template", this);
controller.registerHandler(GET, "/{index}/_msearch/template", this);
controller.registerHandler(POST, "/{index}/_msearch/template", this);
controller.registerHandler(GET, "/{index}/{type}/_msearch/template", this);
controller.registerHandler(POST, "/{index}/{type}/_msearch/template", this);
}
示例6: RestSearchTemplateAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
public RestSearchTemplateAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(GET, "/_search/template", this);
controller.registerHandler(POST, "/_search/template", this);
controller.registerHandler(GET, "/{index}/_search/template", this);
controller.registerHandler(POST, "/{index}/_search/template", this);
controller.registerHandler(GET, "/{index}/{type}/_search/template", this);
controller.registerHandler(POST, "/{index}/{type}/_search/template", this);
}
示例7: getRestHandlers
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings,
RestController restController, ClusterSettings clusterSettings,
IndexScopedSettings indexScopedSettings,
SettingsFilter settingsFilter,
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<DiscoveryNodes> nodesInCluster) {
return Arrays.asList(new ReportGenerateRestAction(settings, restController));
}
示例8: RestMultiGetAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
public RestMultiGetAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(GET, "/_mget", this);
controller.registerHandler(POST, "/_mget", this);
controller.registerHandler(GET, "/{index}/_mget", this);
controller.registerHandler(POST, "/{index}/_mget", this);
controller.registerHandler(GET, "/{index}/{type}/_mget", this);
controller.registerHandler(POST, "/{index}/{type}/_mget", this);
this.allowExplicitIndex = MULTI_ALLOW_EXPLICIT_INDEX.get(settings);
}
示例9: RocchioExpandRestAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
@Inject
public RocchioExpandRestAction(Settings settings, RestController controller) {
super(settings);
// Register your handlers here
controller.registerHandler(Method.GET, "/{index}/{type}/_expand", this);
controller.registerHandler(Method.GET, "/{index}/_expand", this);
}
示例10: getRestHandlers
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings,
IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<DiscoveryNodes> nodesInCluster) {
return Arrays.asList(
new RestReindexAction(settings, restController),
new RestUpdateByQueryAction(settings, restController),
new RestDeleteByQueryAction(settings, restController),
new RestRethrottleAction(settings, restController, nodesInCluster));
}
示例11: RestAnalyzeAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
@Inject
public RestAnalyzeAction(Settings settings, RestController controller, Client client) {
super(settings, controller, client);
controller.registerHandler(GET, "/_analyze", this);
controller.registerHandler(GET, "/{index}/_analyze", this);
controller.registerHandler(POST, "/_analyze", this);
controller.registerHandler(POST, "/{index}/_analyze", this);
}
示例12: RestNoopBulkAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
public RestNoopBulkAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(POST, "/_noop_bulk", this);
controller.registerHandler(PUT, "/_noop_bulk", this);
controller.registerHandler(POST, "/{index}/_noop_bulk", this);
controller.registerHandler(PUT, "/{index}/_noop_bulk", this);
controller.registerHandler(POST, "/{index}/{type}/_noop_bulk", this);
controller.registerHandler(PUT, "/{index}/{type}/_noop_bulk", this);
}
示例13: getRestHandlers
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings,
IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<DiscoveryNodes> nodesInCluster) {
return Arrays.asList(
new RestNoopBulkAction(settings, restController),
new RestNoopSearchAction(settings, restController));
}
示例14: RestTermVectorsAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
public RestTermVectorsAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(GET, "/{index}/{type}/_termvectors", this);
controller.registerHandler(POST, "/{index}/{type}/_termvectors", this);
controller.registerHandler(GET, "/{index}/{type}/{id}/_termvectors", this);
controller.registerHandler(POST, "/{index}/{type}/{id}/_termvectors", this);
// we keep usage of _termvector as alias for now
controller.registerHandler(GET, "/{index}/{type}/_termvector", this);
controller.registerHandler(POST, "/{index}/{type}/_termvector", this);
controller.registerHandler(GET, "/{index}/{type}/{id}/_termvector", this);
controller.registerHandler(POST, "/{index}/{type}/{id}/_termvector", this);
}
示例15: RestFieldStatsAction
import org.elasticsearch.rest.RestController; //导入依赖的package包/类
public RestFieldStatsAction(Settings settings, RestController controller) {
super(settings);
controller.registerHandler(GET, "/_field_stats", this);
controller.registerHandler(POST, "/_field_stats", this);
controller.registerHandler(GET, "/{index}/_field_stats", this);
controller.registerHandler(POST, "/{index}/_field_stats", this);
}