Tabnine Logo
ClearIndicesCacheRequest.fields
Code IndexAdd Tabnine to your IDE (free)

How to use
fields
method
in
org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheRequest

Best Java code snippets using org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheRequest.fields (Showing top 20 results out of 315)

origin: SonarSource/sonarqube

 @Override
 public String toString() {
  StringBuilder message = new StringBuilder();
  message.append("ES clear cache request");
  if (request.indices().length > 0) {
   message.append(String.format(" on indices '%s'", StringUtils.join(request.indices(), ",")));
  }
  String[] fields = request.fields();
  if (fields != null && fields.length > 0) {
   message.append(String.format(" on fields '%s'", StringUtils.join(fields, ",")));
  }
  if (request.queryCache()) {
   message.append(" with filter cache");
  }
  if (request.fieldDataCache()) {
   message.append(" with field data cache");
  }
  if (request.requestCache()) {
   message.append(" with request cache");
  }
  return message.toString();
 }
}
origin: org.elasticsearch/elasticsearch

public ClearIndicesCacheRequestBuilder setFields(String... fields) {
  request.fields(fields);
  return this;
}
origin: org.elasticsearch/elasticsearch

public static ClearIndicesCacheRequest fromRequest(final RestRequest request, ClearIndicesCacheRequest clearIndicesCacheRequest) {
  for (Map.Entry<String, String> entry : request.params().entrySet()) {
    if (Fields.QUERY.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.queryCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.queryCache()));
    } else if (Fields.REQUEST.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.requestCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.requestCache()));
    } else if (Fields.FIELDDATA.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.fieldDataCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.fieldDataCache()));
    } else  if (Fields.FIELDS.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.fields(request.paramAsStringArray(entry.getKey(), clearIndicesCacheRequest.fields()));
    }
  }
  return clearIndicesCacheRequest;
}
origin: org.elasticsearch/elasticsearch

@Override
protected EmptyResult shardOperation(ClearIndicesCacheRequest request, ShardRouting shardRouting) {
  indicesService.clearIndexShardCache(shardRouting.shardId(), request.queryCache(), request.fieldDataCache(), request.requestCache(),
    request.fields());
  return EmptyResult.INSTANCE;
}
origin: harbby/presto-connectors

public ClearIndicesCacheRequestBuilder setFields(String... fields) {
  request.fields(fields);
  return this;
}
origin: com.strapdata.elasticsearch/elasticsearch

public ClearIndicesCacheRequestBuilder setFields(String... fields) {
  request.fields(fields);
  return this;
}
origin: javanna/elasticshell

public ClearCacheRequestBuilder<JsonInput, JsonOutput> fields(String... fields) {
  request.fields(fields);
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public ClearIndicesCacheRequestBuilder setFields(String... fields) {
  request.fields(fields);
  return this;
}
origin: apache/servicemix-bundles

public ClearIndicesCacheRequestBuilder setFields(String... fields) {
  request.fields(fields);
  return this;
}
origin: org.sonarsource.sonarqube/sonar-server

 @Override
 public String toString() {
  StringBuilder message = new StringBuilder();
  message.append("ES clear cache request");
  if (request.indices().length > 0) {
   message.append(String.format(" on indices '%s'", StringUtils.join(request.indices(), ",")));
  }
  String[] fields = request.fields();
  if (fields != null && fields.length > 0) {
   message.append(String.format(" on fields '%s'", StringUtils.join(fields, ",")));
  }
  if (request.queryCache()) {
   message.append(" with filter cache");
  }
  if (request.fieldDataCache()) {
   message.append(" with field data cache");
  }
  if (request.requestCache()) {
   message.append(" with request cache");
  }
  return message.toString();
 }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public static ClearIndicesCacheRequest fromRequest(final RestRequest request, ClearIndicesCacheRequest clearIndicesCacheRequest) {
  for (Map.Entry<String, String> entry : request.params().entrySet()) {
    if (Fields.QUERY.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.queryCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.queryCache()));
    } else if (Fields.REQUEST.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.requestCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.requestCache()));
    } else if (Fields.FIELDDATA.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.fieldDataCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.fieldDataCache()));
    } else  if (Fields.FIELDS.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.fields(request.paramAsStringArray(entry.getKey(), clearIndicesCacheRequest.fields()));
    }
  }
  return clearIndicesCacheRequest;
}
origin: apache/servicemix-bundles

public static ClearIndicesCacheRequest fromRequest(final RestRequest request, ClearIndicesCacheRequest clearIndicesCacheRequest) {
  for (Map.Entry<String, String> entry : request.params().entrySet()) {
    if (Fields.QUERY.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.queryCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.queryCache()));
    } else if (Fields.REQUEST.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.requestCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.requestCache()));
    } else if (Fields.FIELDDATA.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.fieldDataCache(request.paramAsBoolean(entry.getKey(), clearIndicesCacheRequest.fieldDataCache()));
    } else  if (Fields.FIELDS.match(entry.getKey(), LoggingDeprecationHandler.INSTANCE)) {
      clearIndicesCacheRequest.fields(request.paramAsStringArray(entry.getKey(), clearIndicesCacheRequest.fields()));
    }
  }
  return clearIndicesCacheRequest;
}
origin: harbby/presto-connectors

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;
}
origin: com.strapdata.elasticsearch/elasticsearch

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;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
protected EmptyResult shardOperation(ClearIndicesCacheRequest request, ShardRouting shardRouting) {
  indicesService.clearIndexShardCache(shardRouting.shardId(), request.queryCache(), request.fieldDataCache(), request.requestCache(),
    request.fields());
  return EmptyResult.INSTANCE;
}
origin: apache/servicemix-bundles

@Override
protected EmptyResult shardOperation(ClearIndicesCacheRequest request, ShardRouting shardRouting) {
  indicesService.clearIndexShardCache(shardRouting.shardId(), request.queryCache(), request.fieldDataCache(), request.requestCache(),
    request.fields());
  return EmptyResult.INSTANCE;
}
origin: org.elasticsearch.client/elasticsearch-rest-high-level-client

static Request clearCache(ClearIndicesCacheRequest clearIndicesCacheRequest) {
  String[] indices = clearIndicesCacheRequest.indices() == null ? Strings.EMPTY_ARRAY :clearIndicesCacheRequest.indices();
  Request request = new Request(HttpPost.METHOD_NAME, RequestConverters.endpoint(indices, "_cache/clear"));
  RequestConverters.Params parameters = new RequestConverters.Params(request);
  parameters.withIndicesOptions(clearIndicesCacheRequest.indicesOptions());
  parameters.putParam("query", Boolean.toString(clearIndicesCacheRequest.queryCache()));
  parameters.putParam("fielddata", Boolean.toString(clearIndicesCacheRequest.fieldDataCache()));
  parameters.putParam("request", Boolean.toString(clearIndicesCacheRequest.requestCache()));
  parameters.putParam("fields", String.join(",", clearIndicesCacheRequest.fields()));
  return request;
}
origin: apache/servicemix-bundles

static Request clearCache(ClearIndicesCacheRequest clearIndicesCacheRequest) {
  String[] indices = clearIndicesCacheRequest.indices() == null ? Strings.EMPTY_ARRAY :clearIndicesCacheRequest.indices();
  Request request = new Request(HttpPost.METHOD_NAME, RequestConverters.endpoint(indices, "_cache/clear"));
  RequestConverters.Params parameters = new RequestConverters.Params(request);
  parameters.withIndicesOptions(clearIndicesCacheRequest.indicesOptions());
  parameters.putParam("query", Boolean.toString(clearIndicesCacheRequest.queryCache()));
  parameters.putParam("fielddata", Boolean.toString(clearIndicesCacheRequest.fieldDataCache()));
  parameters.putParam("request", Boolean.toString(clearIndicesCacheRequest.requestCache()));
  parameters.putParam("fields", String.join(",", clearIndicesCacheRequest.fields()));
  return request;
}
origin: com.strapdata.elasticsearch/elasticsearch

if (request.fields() == null || request.fields().length == 0) {
  service.fieldData().clear();
} else {
  for (String field : request.fields()) {
    service.fieldData().clearField(field);
if (request.fields() != null && request.fields().length > 0) {
  for (String field : request.fields()) {
    service.fieldData().clearField(field);
origin: harbby/presto-connectors

if (request.fields() == null || request.fields().length == 0) {
  service.fieldData().clear();
} else {
  for (String field : request.fields()) {
    service.fieldData().clearField(field);
if (request.fields() != null && request.fields().length > 0) {
  for (String field : request.fields()) {
    service.fieldData().clearField(field);
org.elasticsearch.action.admin.indices.cache.clearClearIndicesCacheRequestfields

Popular methods of ClearIndicesCacheRequest

  • fieldDataCache
  • queryCache
  • requestCache
  • <init>
  • indicesOptions
  • indices
  • readFrom
  • recycler
  • filterCache
  • filterKeys
  • idCache
  • ignoreIndices
  • idCache,
  • ignoreIndices

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • notifyDataSetChanged (ArrayAdapter)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now