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

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

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

origin: org.elasticsearch/elasticsearch

private PutMappingRequestBuilder updateMappingRequest(Index index, String type, Mapping mappingUpdate, final TimeValue timeout) {
  if (type.equals(MapperService.DEFAULT_MAPPING)) {
    throw new IllegalArgumentException("_default_ mapping should not be updated");
  }
  return client.preparePutMapping().setConcreteIndex(index).setType(type).setSource(mappingUpdate.toString(), XContentType.JSON)
      .setMasterNodeTimeout(timeout).setTimeout(timeout);
}
origin: org.elasticsearch/elasticsearch

@Override
public IndexShard createShard(ShardRouting shardRouting, RecoveryState recoveryState, PeerRecoveryTargetService recoveryTargetService,
               PeerRecoveryTargetService.RecoveryListener recoveryListener, RepositoriesService repositoriesService,
               Consumer<IndexShard.ShardFailure> onShardFailure,
               Consumer<ShardId> globalCheckpointSyncer) throws IOException {
  ensureChangesAllowed();
  IndexService indexService = indexService(shardRouting.index());
  IndexShard indexShard = indexService.createShard(shardRouting, globalCheckpointSyncer);
  indexShard.addShardFailureCallback(onShardFailure);
  indexShard.startRecovery(recoveryState, recoveryTargetService, recoveryListener, repositoriesService,
    (type, mapping) -> {
      assert recoveryState.getRecoverySource().getType() == RecoverySource.Type.LOCAL_SHARDS:
        "mapping update consumer only required by local shards recovery";
      client.admin().indices().preparePutMapping()
        .setConcreteIndex(shardRouting.index()) // concrete index - no name clash, it uses uuid
        .setType(type)
        .setSource(mapping.source().string(), XContentType.JSON)
        .get();
    }, this);
  return indexShard;
}
origin: com.strapdata.elasticsearch/elasticsearch

private PutMappingRequestBuilder updateMappingRequest(Index index, String type, Mapping mappingUpdate, final TimeValue timeout) {
  if (type.equals(MapperService.DEFAULT_MAPPING)) {
    throw new IllegalArgumentException("_default_ mapping should not be updated");
  }
  return client.preparePutMapping().setConcreteIndex(index).setType(type).setSource(mappingUpdate.toString())
      .setMasterNodeTimeout(timeout).setTimeout(timeout);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private PutMappingRequestBuilder updateMappingRequest(Index index, String type, Mapping mappingUpdate, final TimeValue timeout) {
  if (type.equals(MapperService.DEFAULT_MAPPING)) {
    throw new IllegalArgumentException("_default_ mapping should not be updated");
  }
  return client.preparePutMapping().setConcreteIndex(index).setType(type).setSource(mappingUpdate.toString(), XContentType.JSON)
      .setMasterNodeTimeout(timeout).setTimeout(timeout);
}
origin: apache/servicemix-bundles

private PutMappingRequestBuilder updateMappingRequest(Index index, String type, Mapping mappingUpdate, final TimeValue timeout) {
  if (type.equals(MapperService.DEFAULT_MAPPING)) {
    throw new IllegalArgumentException("_default_ mapping should not be updated");
  }
  return client.preparePutMapping().setConcreteIndex(index).setType(type).setSource(mappingUpdate.toString(), XContentType.JSON)
      .setMasterNodeTimeout(timeout).setTimeout(timeout);
}
origin: com.strapdata.elasticsearch/elasticsearch

@Override
public IndexShard createShard(ShardRouting shardRouting, RecoveryState recoveryState, PeerRecoveryTargetService recoveryTargetService,
               PeerRecoveryTargetService.RecoveryListener recoveryListener, RepositoriesService repositoriesService,
               Callback<IndexShard.ShardFailure> onShardFailure) throws IOException {
  ensureChangesAllowed();
  IndexService indexService = indexService(shardRouting.index());
  IndexShard indexShard = indexService.createShard(shardRouting);
  indexShard.addShardFailureCallback(onShardFailure);
  indexShard.startRecovery(recoveryState, recoveryTargetService, recoveryListener, repositoriesService,
    (type, mapping) -> {
      assert recoveryState.getRecoverySource().getType() == RecoverySource.Type.LOCAL_SHARDS:
        "mapping update consumer only required by local shards recovery";
      try {
        client.admin().indices().preparePutMapping()
          .setConcreteIndex(shardRouting.index()) // concrete index - no name clash, it uses uuid
          .setType(type)
          .setSource(mapping.source().string())
          .get();
      } catch (IOException ex) {
        throw new ElasticsearchException("failed to stringify mapping source", ex);
      }
    }, this);
  return indexShard;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public IndexShard createShard(ShardRouting shardRouting, RecoveryState recoveryState, PeerRecoveryTargetService recoveryTargetService,
               PeerRecoveryTargetService.RecoveryListener recoveryListener, RepositoriesService repositoriesService,
               Consumer<IndexShard.ShardFailure> onShardFailure,
               Consumer<ShardId> globalCheckpointSyncer) throws IOException {
  ensureChangesAllowed();
  IndexService indexService = indexService(shardRouting.index());
  IndexShard indexShard = indexService.createShard(shardRouting, globalCheckpointSyncer);
  indexShard.addShardFailureCallback(onShardFailure);
  indexShard.startRecovery(recoveryState, recoveryTargetService, recoveryListener, repositoriesService,
    (type, mapping) -> {
      assert recoveryState.getRecoverySource().getType() == RecoverySource.Type.LOCAL_SHARDS:
        "mapping update consumer only required by local shards recovery";
      try {
        client.admin().indices().preparePutMapping()
          .setConcreteIndex(shardRouting.index()) // concrete index - no name clash, it uses uuid
          .setType(type)
          .setSource(mapping.source().string(), XContentType.JSON)
          .get();
      } catch (IOException ex) {
        throw new ElasticsearchException("failed to stringify mapping source", ex);
      }
    }, this);
  return indexShard;
}
origin: apache/servicemix-bundles

try {
  client.admin().indices().preparePutMapping()
    .setConcreteIndex(shardRouting.index()) // concrete index - no name clash, it uses uuid
    .setType(type)
    .setSource(mapping.source().string(), XContentType.JSON)
org.elasticsearch.action.admin.indices.mapping.putPutMappingRequestBuildersetConcreteIndex

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
  • setIndices
  • <init>
  • setMasterNodeTimeout
  • setTimeout
  • setUpdateAllTypes
    True if all fields that span multiple types should be updated, false otherwise

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • BoxLayout (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Sublime Text 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