当前位置: 首页>>代码示例>>Java>>正文


Java RestController类代码示例

本文整理汇总了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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:25,代码来源:RestSearchAction.java

示例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
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:18,代码来源:RestIndexPutAliasAction.java

示例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);
}
 
开发者ID:ghostboyzone,项目名称:ESAuthPlugin,代码行数:11,代码来源:ESAuthPluginAction.java

示例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));
}
 
开发者ID:duniter-gchange,项目名称:gchange-pod,代码行数:8,代码来源:RestMarketRecordUpdateAction.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:RestMultiSearchTemplateAction.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:RestSearchTemplateAction.java

示例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));
}
 
开发者ID:malike,项目名称:elasticsearch-report-engine,代码行数:10,代码来源:ElasticReportPlugin.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:RestMultiGetAction.java

示例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);
}
 
开发者ID:biocaddie,项目名称:elasticsearch-queryexpansion-plugin,代码行数:9,代码来源:RocchioExpandRestAction.java

示例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));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:ReindexPlugin.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:9,代码来源:RestAnalyzeAction.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:RestNoopBulkAction.java

示例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));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:NoopPlugin.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:RestTermVectorsAction.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:RestFieldStatsAction.java


注:本文中的org.elasticsearch.rest.RestController类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。