當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。