Tabnine Logo
PutMappingRequestBuilder.setIndices
Code IndexAdd Tabnine to your IDE (free)

How to use
setIndices
method
in
org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequestBuilder

Best Java code snippets using org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequestBuilder.setIndices (Showing top 8 results out of 315)

origin: org.elasticsearch/elasticsearch

@Override
public PutMappingRequestBuilder preparePutMapping(String... indices) {
  return new PutMappingRequestBuilder(this, PutMappingAction.INSTANCE).setIndices(indices);
}
origin: harbby/presto-connectors

@Override
public PutMappingRequestBuilder preparePutMapping(String... indices) {
  return new PutMappingRequestBuilder(this, PutMappingAction.INSTANCE).setIndices(indices);
}
origin: com.strapdata.elasticsearch/elasticsearch

@Override
public PutMappingRequestBuilder preparePutMapping(String... indices) {
  return new PutMappingRequestBuilder(this, PutMappingAction.INSTANCE).setIndices(indices);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public PutMappingRequestBuilder preparePutMapping(String... indices) {
  return new PutMappingRequestBuilder(this, PutMappingAction.INSTANCE).setIndices(indices);
}
origin: stackoverflow.com

 public void putMappingFromString(String index, String type, String mapping) {

  IndicesAdminClient iac = getClient().admin().indices();
  PutMappingRequestBuilder pmrb = new PutMappingRequestBuilder(iac);
  pmrb.setIndices(index);
  pmrb.setType(type);
  pmrb.setSource(mapping);
  ListenableActionFuture<PutMappingResponse> laf = pmrb.execute();
  PutMappingResponse pmr = laf.actionGet();
  pmr.getAcknowledged();

}
origin: fujitsu-pio/io

/**
 * Mapping定義を更新する.
 * @param index インデックス名
 * @param type タイプ名
 * @param mappings マッピング情報
 * @return 非同期応答
 */
public ListenableActionFuture<PutMappingResponse> putMapping(String index,
    String type,
    Map<String, Object> mappings) {
  PutMappingRequestBuilder builder = new PutMappingRequestBuilder(esTransportClient.admin().indices(), PutMappingAction.INSTANCE)
      .setIndices(index)
      .setType(type)
      .setSource(mappings);
  return builder.execute();
}
origin: apache/metamodel

@Override
public Table execute() throws MetaModelException {
  final MutableTable table = getTable();
  final Map<String, ?> source = ElasticSearchUtils.getMappingSource(table);
  final ElasticSearchDataContext dataContext = getUpdateCallback().getDataContext();
  final IndicesAdminClient indicesAdmin = dataContext.getElasticSearchClient().admin().indices();
  final String indexName = dataContext.getIndexName();
  final PutMappingRequestBuilder requestBuilder =
      new PutMappingRequestBuilder(indicesAdmin, PutMappingAction.INSTANCE).setIndices(indexName)
          .setType(table.getName());
  requestBuilder.setSource(source);
  final PutMappingResponse result = requestBuilder.execute().actionGet();
  logger.debug("PutMapping response: acknowledged={}", result.isAcknowledged());
  dataContext.getElasticSearchClient().admin().indices().prepareRefresh(indexName).get();
  final MutableSchema schema = (MutableSchema) getSchema();
  schema.addTable(table);
  return table;
}
origin: org.apache.metamodel/MetaModel-elasticsearch-native

@Override
public Table execute() throws MetaModelException {
  final MutableTable table = getTable();
  final Map<String, ?> source = ElasticSearchUtils.getMappingSource(table);
  final ElasticSearchDataContext dataContext = getUpdateCallback().getDataContext();
  final IndicesAdminClient indicesAdmin = dataContext.getElasticSearchClient().admin().indices();
  final String indexName = dataContext.getIndexName();
  final PutMappingRequestBuilder requestBuilder =
      new PutMappingRequestBuilder(indicesAdmin, PutMappingAction.INSTANCE).setIndices(indexName)
          .setType(table.getName());
  requestBuilder.setSource(source);
  final PutMappingResponse result = requestBuilder.execute().actionGet();
  logger.debug("PutMapping response: acknowledged={}", result.isAcknowledged());
  dataContext.getElasticSearchClient().admin().indices().prepareRefresh(indexName).get();
  final MutableSchema schema = (MutableSchema) getSchema();
  schema.addTable(table);
  return table;
}
org.elasticsearch.action.admin.indices.mapping.putPutMappingRequestBuildersetIndices

Javadoc

Specifies what type of requested indices to ignore and wildcard indices expressions.

For example indices that don't exist.

Popular methods of PutMappingRequestBuilder

  • setSource
    A specialized simplified mapping source method, takes the form of simple properties definition: ("fi
  • setType
    The type of the mappings.
  • execute
  • get
  • setIgnoreConflicts
  • <init>
  • setMasterNodeTimeout
  • setTimeout
  • setConcreteIndex
  • setUpdateAllTypes
    True if all fields that span multiple types should be updated, false otherwise

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • CodeWhisperer alternatives
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