Search in sources :

Example 1 with ShardSuggestService

use of de.spinscale.elasticsearch.service.suggest.ShardSuggestService in project elasticsearch-suggest-plugin by spinscale.

the class TransportSuggestRefreshAction method shardOperation.

@Override
protected ShardSuggestRefreshResponse shardOperation(ShardSuggestRefreshRequest request) throws ElasticsearchException {
    logger.trace("Entered TransportSuggestRefreshAction.shardOperation()");
    IndexService indexService = indicesService.indexServiceSafe(request.index());
    ShardSuggestService suggestShardService = indexService.shardInjectorSafe(request.shardId()).getInstance(ShardSuggestService.class);
    return suggestShardService.refresh(request);
}
Also used : ShardSuggestService(de.spinscale.elasticsearch.service.suggest.ShardSuggestService) IndexService(org.elasticsearch.index.service.IndexService)

Example 2 with ShardSuggestService

use of de.spinscale.elasticsearch.service.suggest.ShardSuggestService in project elasticsearch-suggest-plugin by spinscale.

the class TransportSuggestStatisticsAction method shardOperation.

@Override
protected ShardSuggestStatisticsResponse shardOperation(ShardSuggestStatisticsRequest request) throws ElasticsearchException {
    IndexService indexService = indicesService.indexServiceSafe(request.index());
    ShardSuggestService suggestShardService = indexService.shardInjectorSafe(request.shardId()).getInstance(ShardSuggestService.class);
    return suggestShardService.getStatistics();
}
Also used : ShardSuggestService(de.spinscale.elasticsearch.service.suggest.ShardSuggestService) IndexService(org.elasticsearch.index.service.IndexService)

Example 3 with ShardSuggestService

use of de.spinscale.elasticsearch.service.suggest.ShardSuggestService in project elasticsearch-suggest-plugin by spinscale.

the class TransportSuggestAction method shardOperation.

@Override
protected ShardSuggestResponse shardOperation(ShardSuggestRequest request) throws ElasticsearchException {
    logger.trace("Entered TransportSuggestAction.shardOperation()");
    IndexService indexService = indicesService.indexServiceSafe(request.index());
    ShardSuggestService suggestShardService = indexService.shardInjectorSafe(request.shardId()).getInstance(ShardSuggestService.class);
    return suggestShardService.suggest(request);
}
Also used : ShardSuggestService(de.spinscale.elasticsearch.service.suggest.ShardSuggestService) IndexService(org.elasticsearch.index.service.IndexService)

Aggregations

ShardSuggestService (de.spinscale.elasticsearch.service.suggest.ShardSuggestService)3 IndexService (org.elasticsearch.index.service.IndexService)3