public static ClearIndicesCacheRequest fromRequest(final RestRequest request, ClearIndicesCacheRequest clearIndicesCacheRequest, ParseFieldMatcher parseFieldMatcher) { for (Map.Entry<String, String> entry : request.params().entrySet()) { if (parseFieldMatcher.match(entry.getKey(), Fields.QUERY)) { clearIndicesCacheRequest.queryCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.queryCache())); } if (parseFieldMatcher.match(entry.getKey(), Fields.FIELD_DATA)) { clearIndicesCacheRequest.fieldDataCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.fieldDataCache())); } if (parseFieldMatcher.match(entry.getKey(), Fields.RECYCLER)) { clearIndicesCacheRequest.recycler(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.recycler())); } if (parseFieldMatcher.match(entry.getKey(), Fields.FIELDS)) { clearIndicesCacheRequest.fields(request.paramAsStringArray(entry.getKey(), clearIndicesCacheRequest.fields())); } } return clearIndicesCacheRequest; }
public static ClearIndicesCacheRequest fromRequest(final RestRequest request, ClearIndicesCacheRequest clearIndicesCacheRequest) { for (Map.Entry<String, String> entry : request.params().entrySet()) { if (Fields.QUERY.match(entry.getKey())) { clearIndicesCacheRequest.queryCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.queryCache())); } if (Fields.REQUEST.match(entry.getKey())) { clearIndicesCacheRequest.requestCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.requestCache())); } if (Fields.FIELD_DATA.match(entry.getKey())) { clearIndicesCacheRequest.fieldDataCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.fieldDataCache())); } if (Fields.RECYCLER.match(entry.getKey())) { clearIndicesCacheRequest.recycler(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.recycler())); } if (Fields.FIELDS.match(entry.getKey())) { clearIndicesCacheRequest.fields(request.paramAsStringArray(entry.getKey(), clearIndicesCacheRequest.fields())); } } return clearIndicesCacheRequest; }
indicesService.clearRequestCache(shard); if (request.recycler()) { logger.debug("Clear CacheRecycler on index [{}]", service.index()); clearedAtLeastOne = true;
indicesRequestCache.clear(shard); if (request.recycler()) { logger.debug("Clear CacheRecycler on index [{}]", service.index()); clearedAtLeastOne = true;