- About
- Browser Builds
- Quick Start
- API Conventions
- Configuration
- SSL and Authentication
- Extending
- Extensions
- setup logging
- Contributing
- 7.6 API
bulk
clearScroll
count
create
delete
deleteByQuery
deleteByQueryRethrottle
deleteScript
exists
existsSource
explain
fieldCaps
get
getScript
getSource
index
info
mget
msearch
msearchTemplate
mtermvectors
ping
putScript
rankEval
reindex
reindexRethrottle
renderSearchTemplate
scriptsPainlessExecute
scroll
search
searchShards
searchTemplate
termvectors
update
updateByQuery
updateByQueryRethrottle
cat.aliases
cat.allocation
cat.count
cat.fielddata
cat.health
cat.help
cat.indices
cat.master
cat.nodeattrs
cat.nodes
cat.pendingTasks
cat.plugins
cat.recovery
cat.repositories
cat.segments
cat.shards
cat.snapshots
cat.tasks
cat.templates
cat.threadPool
cluster.allocationExplain
cluster.getSettings
cluster.health
cluster.pendingTasks
cluster.putSettings
cluster.remoteInfo
cluster.reroute
cluster.state
cluster.stats
indices.analyze
indices.clearCache
indices.clone
indices.close
indices.create
indices.delete
indices.deleteAlias
indices.deleteTemplate
indices.exists
indices.existsAlias
indices.existsTemplate
indices.existsType
indices.flush
indices.flushSynced
indices.forcemerge
indices.get
indices.getAlias
indices.getFieldMapping
indices.getMapping
indices.getSettings
indices.getTemplate
indices.getUpgrade
indices.open
indices.putAlias
indices.putMapping
indices.putSettings
indices.putTemplate
indices.recovery
indices.refresh
indices.rollover
indices.segments
indices.shardStores
indices.shrink
indices.split
indices.stats
indices.updateAliases
indices.upgrade
indices.validateQuery
ingest.deletePipeline
ingest.getPipeline
ingest.processorGrok
ingest.putPipeline
ingest.simulate
nodes.hotThreads
nodes.info
nodes.reloadSecureSettings
nodes.stats
nodes.usage
snapshot.create
snapshot.createRepository
snapshot.delete
snapshot.deleteRepository
snapshot.get
snapshot.getRepository
snapshot.restore
snapshot.status
snapshot.verifyRepository
tasks.cancel
tasks.get
tasks.list
- 7.5 API
bulk
clearScroll
count
create
delete
deleteByQuery
deleteByQueryRethrottle
deleteScript
exists
existsSource
explain
fieldCaps
get
getScript
getSource
index
info
mget
msearch
msearchTemplate
mtermvectors
ping
putScript
rankEval
reindex
reindexRethrottle
renderSearchTemplate
scriptsPainlessExecute
scroll
search
searchShards
searchTemplate
termvectors
update
updateByQuery
updateByQueryRethrottle
cat.aliases
cat.allocation
cat.count
cat.fielddata
cat.health
cat.help
cat.indices
cat.master
cat.nodeattrs
cat.nodes
cat.pendingTasks
cat.plugins
cat.recovery
cat.repositories
cat.segments
cat.shards
cat.snapshots
cat.tasks
cat.templates
cat.threadPool
cluster.allocationExplain
cluster.getSettings
cluster.health
cluster.pendingTasks
cluster.putSettings
cluster.remoteInfo
cluster.reroute
cluster.state
cluster.stats
indices.analyze
indices.clearCache
indices.clone
indices.close
indices.create
indices.delete
indices.deleteAlias
indices.deleteTemplate
indices.exists
indices.existsAlias
indices.existsTemplate
indices.existsType
indices.flush
indices.flushSynced
indices.forcemerge
indices.get
indices.getAlias
indices.getFieldMapping
indices.getMapping
indices.getSettings
indices.getTemplate
indices.getUpgrade
indices.open
indices.putAlias
indices.putMapping
indices.putSettings
indices.putTemplate
indices.recovery
indices.refresh
indices.rollover
indices.segments
indices.shardStores
indices.shrink
indices.split
indices.stats
indices.updateAliases
indices.upgrade
indices.validateQuery
ingest.deletePipeline
ingest.getPipeline
ingest.processorGrok
ingest.putPipeline
ingest.simulate
nodes.hotThreads
nodes.info
nodes.reloadSecureSettings
nodes.stats
nodes.usage
snapshot.create
snapshot.createRepository
snapshot.delete
snapshot.deleteRepository
snapshot.get
snapshot.getRepository
snapshot.restore
snapshot.status
snapshot.verifyRepository
tasks.cancel
tasks.get
tasks.list
- 7.4 API
bulk
clearScroll
count
create
delete
deleteByQuery
deleteByQueryRethrottle
deleteScript
exists
existsSource
explain
fieldCaps
get
getScript
getSource
index
info
mget
msearch
msearchTemplate
mtermvectors
ping
putScript
rankEval
reindex
reindexRethrottle
renderSearchTemplate
scriptsPainlessExecute
scroll
search
searchShards
searchTemplate
termvectors
update
updateByQuery
updateByQueryRethrottle
cat.aliases
cat.allocation
cat.count
cat.fielddata
cat.health
cat.help
cat.indices
cat.master
cat.nodeattrs
cat.nodes
cat.pendingTasks
cat.plugins
cat.recovery
cat.repositories
cat.segments
cat.shards
cat.snapshots
cat.tasks
cat.templates
cat.threadPool
cluster.allocationExplain
cluster.getSettings
cluster.health
cluster.pendingTasks
cluster.putSettings
cluster.remoteInfo
cluster.reroute
cluster.state
cluster.stats
indices.analyze
indices.clearCache
indices.clone
indices.close
indices.create
indices.delete
indices.deleteAlias
indices.deleteTemplate
indices.exists
indices.existsAlias
indices.existsTemplate
indices.existsType
indices.flush
indices.flushSynced
indices.forcemerge
indices.get
indices.getAlias
indices.getFieldMapping
indices.getMapping
indices.getSettings
indices.getTemplate
indices.getUpgrade
indices.open
indices.putAlias
indices.putMapping
indices.putSettings
indices.putTemplate
indices.recovery
indices.refresh
indices.rollover
indices.segments
indices.shardStores
indices.shrink
indices.split
indices.stats
indices.updateAliases
indices.upgrade
indices.validateQuery
ingest.deletePipeline
ingest.getPipeline
ingest.processorGrok
ingest.putPipeline
ingest.simulate
nodes.hotThreads
nodes.info
nodes.reloadSecureSettings
nodes.stats
nodes.usage
snapshot.create
snapshot.createRepository
snapshot.delete
snapshot.deleteRepository
snapshot.get
snapshot.getRepository
snapshot.restore
snapshot.status
snapshot.verifyRepository
tasks.cancel
tasks.get
tasks.list
- 7.3 API
bulk
clearScroll
count
create
delete
deleteByQuery
deleteByQueryRethrottle
deleteScript
exists
existsSource
explain
fieldCaps
get
getScript
getSource
index
info
mget
msearch
msearchTemplate
mtermvectors
ping
putScript
rankEval
reindex
reindexRethrottle
renderSearchTemplate
scriptsPainlessExecute
scroll
search
searchShards
searchTemplate
termvectors
update
updateByQuery
updateByQueryRethrottle
cat.aliases
cat.allocation
cat.count
cat.fielddata
cat.health
cat.help
cat.indices
cat.master
cat.nodeattrs
cat.nodes
cat.pendingTasks
cat.plugins
cat.recovery
cat.repositories
cat.segments
cat.shards
cat.snapshots
cat.tasks
cat.templates
cat.threadPool
cluster.allocationExplain
cluster.getSettings
cluster.health
cluster.pendingTasks
cluster.putSettings
cluster.remoteInfo
cluster.reroute
cluster.state
cluster.stats
indices.analyze
indices.clearCache
indices.close
indices.create
indices.delete
indices.deleteAlias
indices.deleteTemplate
indices.exists
indices.existsAlias
indices.existsTemplate
indices.existsType
indices.flush
indices.flushSynced
indices.forcemerge
indices.get
indices.getAlias
indices.getFieldMapping
indices.getMapping
indices.getSettings
indices.getTemplate
indices.getUpgrade
indices.open
indices.putAlias
indices.putMapping
indices.putSettings
indices.putTemplate
indices.recovery
indices.refresh
indices.rollover
indices.segments
indices.shardStores
indices.shrink
indices.split
indices.stats
indices.updateAliases
indices.upgrade
indices.validateQuery
ingest.deletePipeline
ingest.getPipeline
ingest.processorGrok
ingest.putPipeline
ingest.simulate
nodes.hotThreads
nodes.info
nodes.reloadSecureSettings
nodes.stats
nodes.usage
snapshot.create
snapshot.createRepository
snapshot.delete
snapshot.deleteRepository
snapshot.get
snapshot.getRepository
snapshot.restore
snapshot.status
snapshot.verifyRepository
tasks.cancel
tasks.get
tasks.list
- 7.2 API
bulk
clearScroll
count
create
delete
deleteByQuery
deleteByQueryRethrottle
deleteScript
exists
existsSource
explain
fieldCaps
get
getScript
getSource
index
info
mget
msearch
msearchTemplate
mtermvectors
ping
putScript
rankEval
reindex
reindexRethrottle
renderSearchTemplate
scriptsPainlessContext
scriptsPainlessExecute
scroll
search
searchShards
searchTemplate
termvectors
update
updateByQuery
updateByQueryRethrottle
cat.aliases
cat.allocation
cat.count
cat.fielddata
cat.health
cat.help
cat.indices
cat.master
cat.nodeattrs
cat.nodes
cat.pendingTasks
cat.plugins
cat.recovery
cat.repositories
cat.segments
cat.shards
cat.snapshots
cat.tasks
cat.templates
cat.threadPool
cluster.allocationExplain
cluster.getSettings
cluster.health
cluster.pendingTasks
cluster.putSettings
cluster.remoteInfo
cluster.reroute
cluster.state
cluster.stats
indices.analyze
indices.clearCache
indices.close
indices.create
indices.delete
indices.deleteAlias
indices.deleteTemplate
indices.exists
indices.existsAlias
indices.existsTemplate
indices.existsType
indices.flush
indices.flushSynced
indices.forcemerge
indices.get
indices.getAlias
indices.getFieldMapping
indices.getMapping
indices.getSettings
indices.getTemplate
indices.getUpgrade
indices.open
indices.putAlias
indices.putMapping
indices.putSettings
indices.putTemplate
indices.recovery
indices.refresh
indices.rollover
indices.segments
indices.shardStores
indices.shrink
indices.split
indices.stats
indices.updateAliases
indices.upgrade
indices.validateQuery
ingest.deletePipeline
ingest.getPipeline
ingest.processorGrok
ingest.putPipeline
ingest.simulate
nodes.hotThreads
nodes.info
nodes.reloadSecureSettings
nodes.stats
nodes.usage
snapshot.create
snapshot.createRepository
snapshot.delete
snapshot.deleteRepository
snapshot.get
snapshot.getRepository
snapshot.restore
snapshot.status
snapshot.verifyRepository
tasks.cancel
tasks.get
tasks.list
- 7.1 API
bulk
clearScroll
count
create
delete
deleteByQuery
deleteByQueryRethrottle
deleteScript
exists
existsSource
explain
fieldCaps
get
getScript
getSource
index
info
mget
msearch
msearchTemplate
mtermvectors
ping
putScript
rankEval
reindex
reindexRethrottle
renderSearchTemplate
scriptsPainlessExecute
scroll
search
searchShards
searchTemplate
termvectors
update
updateByQuery
updateByQueryRethrottle
cat.aliases
cat.allocation
cat.count
cat.fielddata
cat.health
cat.help
cat.indices
cat.master
cat.nodeattrs
cat.nodes
cat.pendingTasks
cat.plugins
cat.recovery
cat.repositories
cat.segments
cat.shards
cat.snapshots
cat.tasks
cat.templates
cat.threadPool
cluster.allocationExplain
cluster.getSettings
cluster.health
cluster.pendingTasks
cluster.putSettings
cluster.remoteInfo
cluster.reroute
cluster.state
cluster.stats
indices.analyze
indices.clearCache
indices.close
indices.create
indices.delete
indices.deleteAlias
indices.deleteTemplate
indices.exists
indices.existsAlias
indices.existsTemplate
indices.existsType
indices.flush
indices.flushSynced
indices.forcemerge
indices.get
indices.getAlias
indices.getFieldMapping
indices.getMapping
indices.getSettings
indices.getTemplate
indices.getUpgrade
indices.open
indices.putAlias
indices.putMapping
indices.putSettings
indices.putTemplate
indices.recovery
indices.refresh
indices.rollover
indices.segments
indices.shardStores
indices.shrink
indices.split
indices.stats
indices.updateAliases
indices.upgrade
indices.validateQuery
ingest.deletePipeline
ingest.getPipeline
ingest.processorGrok
ingest.putPipeline
ingest.simulate
nodes.hotThreads
nodes.info
nodes.reloadSecureSettings
nodes.stats
nodes.usage
snapshot.create
snapshot.createRepository
snapshot.delete
snapshot.deleteRepository
snapshot.get
snapshot.getRepository
snapshot.restore
snapshot.status
snapshot.verifyRepository
tasks.cancel
tasks.get
tasks.list
- 7.0 API
bulk
clearScroll
count
create
delete
deleteByQuery
deleteByQueryRethrottle
deleteScript
exists
existsSource
explain
fieldCaps
get
getScript
getSource
index
info
mget
msearch
msearchTemplate
mtermvectors
ping
putScript
rankEval
reindex
reindexRethrottle
renderSearchTemplate
scriptsPainlessExecute
scroll
search
searchShards
searchTemplate
termvectors
update
updateByQuery
updateByQueryRethrottle
cat.aliases
cat.allocation
cat.count
cat.fielddata
cat.health
cat.help
cat.indices
cat.master
cat.nodeattrs
cat.nodes
cat.pendingTasks
cat.plugins
cat.recovery
cat.repositories
cat.segments
cat.shards
cat.snapshots
cat.tasks
cat.templates
cat.threadPool
cluster.allocationExplain
cluster.getSettings
cluster.health
cluster.pendingTasks
cluster.putSettings
cluster.remoteInfo
cluster.reroute
cluster.state
cluster.stats
indices.analyze
indices.clearCache
indices.close
indices.create
indices.delete
indices.deleteAlias
indices.deleteTemplate
indices.exists
indices.existsAlias
indices.existsTemplate
indices.existsType
indices.flush
indices.flushSynced
indices.forcemerge
indices.get
indices.getAlias
indices.getFieldMapping
indices.getMapping
indices.getSettings
indices.getTemplate
indices.getUpgrade
indices.open
indices.putAlias
indices.putMapping
indices.putSettings
indices.putTemplate
indices.recovery
indices.refresh
indices.rollover
indices.segments
indices.shardStores
indices.shrink
indices.split
indices.stats
indices.updateAliases
indices.upgrade
indices.validateQuery
ingest.deletePipeline
ingest.getPipeline
ingest.processorGrok
ingest.putPipeline
ingest.simulate
nodes.hotThreads
nodes.info
nodes.reloadSecureSettings
nodes.stats
nodes.usage
snapshot.create
snapshot.createRepository
snapshot.delete
snapshot.deleteRepository
snapshot.get
snapshot.getRepository
snapshot.restore
snapshot.status
snapshot.verifyRepository
tasks.cancel
tasks.get
tasks.list
- 6.8 API
bulk
clearScroll
count
create
delete
deleteByQuery
deleteByQueryRethrottle
deleteScript
exists
existsSource
explain
fieldCaps
get
getScript
getSource
index
info
mget
msearch
msearchTemplate
mtermvectors
ping
putScript
rankEval
reindex
reindexRethrottle
renderSearchTemplate
scriptsPainlessExecute
scroll
search
searchShards
searchTemplate
termvectors
update
updateByQuery
updateByQueryRethrottle
cat.aliases
cat.allocation
cat.count
cat.fielddata
cat.health
cat.help
cat.indices
cat.master
cat.nodeattrs
cat.nodes
cat.pendingTasks
cat.plugins
cat.recovery
cat.repositories
cat.segments
cat.shards
cat.snapshots
cat.tasks
cat.templates
cat.threadPool
cluster.allocationExplain
cluster.getSettings
cluster.health
cluster.pendingTasks
cluster.putSettings
cluster.remoteInfo
cluster.reroute
cluster.state
cluster.stats
indices.analyze
indices.clearCache
indices.close
indices.create
indices.delete
indices.deleteAlias
indices.deleteTemplate
indices.exists
indices.existsAlias
indices.existsTemplate
indices.existsType
indices.flush
indices.flushSynced
indices.forcemerge
indices.get
indices.getAlias
indices.getFieldMapping
indices.getMapping
indices.getSettings
indices.getTemplate
indices.getUpgrade
indices.open
indices.putAlias
indices.putMapping
indices.putSettings
indices.putTemplate
indices.recovery
indices.refresh
indices.rollover
indices.segments
indices.shardStores
indices.shrink
indices.split
indices.stats
indices.updateAliases
indices.upgrade
indices.validateQuery
ingest.deletePipeline
ingest.getPipeline
ingest.processorGrok
ingest.putPipeline
ingest.simulate
nodes.hotThreads
nodes.info
nodes.reloadSecureSettings
nodes.stats
nodes.usage
snapshot.create
snapshot.createRepository
snapshot.delete
snapshot.deleteRepository
snapshot.get
snapshot.getRepository
snapshot.restore
snapshot.status
snapshot.verifyRepository
tasks.cancel
tasks.get
tasks.list
- 5.6 API
bulk
clearScroll
count
countPercolate
create
delete
deleteByQuery
deleteScript
deleteTemplate
exists
existsSource
explain
fieldCaps
fieldStats
get
getScript
getSource
getTemplate
index
info
mget
mpercolate
msearch
msearchTemplate
mtermvectors
percolate
ping
putScript
putTemplate
reindex
reindexRethrottle
renderSearchTemplate
scroll
search
searchShards
searchTemplate
suggest
termvectors
update
updateByQuery
cat.aliases
cat.allocation
cat.count
cat.fielddata
cat.health
cat.help
cat.indices
cat.master
cat.nodeattrs
cat.nodes
cat.pendingTasks
cat.plugins
cat.recovery
cat.repositories
cat.segments
cat.shards
cat.snapshots
cat.tasks
cat.templates
cat.threadPool
cluster.allocationExplain
cluster.getSettings
cluster.health
cluster.pendingTasks
cluster.putSettings
cluster.remoteInfo
cluster.reroute
cluster.state
cluster.stats
indices.analyze
indices.clearCache
indices.close
indices.create
indices.delete
indices.deleteAlias
indices.deleteTemplate
indices.exists
indices.existsAlias
indices.existsTemplate
indices.existsType
indices.flush
indices.flushSynced
indices.forcemerge
indices.get
indices.getAlias
indices.getFieldMapping
indices.getMapping
indices.getSettings
indices.getTemplate
indices.getUpgrade
indices.open
indices.putAlias
indices.putMapping
indices.putSettings
indices.putTemplate
indices.recovery
indices.refresh
indices.rollover
indices.segments
indices.shardStores
indices.shrink
indices.stats
indices.updateAliases
indices.upgrade
indices.validateQuery
ingest.deletePipeline
ingest.getPipeline
ingest.processorGrok
ingest.putPipeline
ingest.simulate
nodes.hotThreads
nodes.info
nodes.stats
snapshot.create
snapshot.createRepository
snapshot.delete
snapshot.deleteRepository
snapshot.get
snapshot.getRepository
snapshot.restore
snapshot.status
snapshot.verifyRepository
tasks.cancel
tasks.get
tasks.list
- Changelog
- Host
- Transport
- Errors
- API Param Types
IMPORTANT: elasticsearch.js has been replaced by the new Elasticsearch JavaScript client. We strongly advise you to migrate to the new client. To learn more, see the migration guide.
index
editindex
editclient.index([params, [callback]])
Stores a typed JSON document in an index, making it searchable. When the id
param is not set, a unique id will be auto-generated. When you specify an id
either a new document will be created, or an existing document will be updated. To enforce "put-if-absent" behavior set the opType
to "create"
or use the create()
method.
Optimistic concurrency control is performed, when the version
argument is specified. By default, no version checks are performed.
By default, the document will be available for get()
actions immediately, but will only be available for searching after an index refresh (which can happen automatically or manually). See indices.refresh
.
Check the API Conventions and the elasticsearch docs for more information pertaining to this method.
Create or update a document.
const response = await client.index({ index: 'myindex', type: 'mytype', id: '1', body: { title: 'Test 1', tags: ['y', 'z'], published: true, } });
Params
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ElasticON events are back!
Learn about the Elastic Search AI Platform from the experts at our live events.
Register now