new SuperMap.ElasticSearch(url, options)
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string |
The url of the ElasticSearch service. |
||||||||||||||||||||
options |
Object |
The optional parameters.
|
Members
-
changefunction
-
The callback of result data returned by the server side.
- Deprecated
- Yes
-
clientObject
-
client ES.
-
eventListenersObject
-
The event listeners.Set the parameter in the constructor (optional). Listen processCompleted and processFailed events supported by MapService, Equivalent to the call the SuperMap.Events.on(eventListeners).
-
eventsSuperMap.Events
-
Events.
-
geoFenceObject
-
The geographical enclosure
Example
{ radius: 1000,//The unit is m center: [104.40, 30.43], unit: 'meter|degree' }
-
openGeoFenceboolean
-
Whether to open the geographical enclosure verification.
-
outOfGeoFencefunction
-
The function that is executed after the data is beyond the geographical enclosure.
-
urlstring
-
The url of the ElasticSearch service.
Methods
-
bulk(params, callback)
ElasticSearch.js, line 98 -
atch operation API, allowing to execute multiple index or delete operations. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-bulk">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-bulk} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
clearScroll(params, callback)
ElasticSearch.js, line 110 -
Clear these scroll requests that have been created, this is by specify scroll parameter to query. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-clearscroll">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-clearscroll} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
count(params, callback)
ElasticSearch.js, line 122 -
Get the counts of documents of cluster, index, type, or query. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-count">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-count} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
count(params, callback)
ElasticSearch.js, line 134 -
Add a typed JSON document in a specific index to make it searchable.If a already exists document that has the same index type or id, there will be an error. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-create">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-create} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index\_.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-index\_.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
delete(params, callback)
ElasticSearch.js, line 158 -
Delete the keyed JSON documents according to it's id from a specific index. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletebyquery">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletebyquery} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
delete(params, callback)
ElasticSearch.js, line 170 -
Delete the script according to it's id. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletescript">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletescript} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html">www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
delete(params, callback)
ElasticSearch.js, line 170 -
Delete the script according to it's id. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletescript">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletescript} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html">www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
deleteTemplate(params, callback)
ElasticSearch.js, line 182 -
Delete the template according to it's id. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletetemplate">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletetemplate} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
exists(params, callback)
ElasticSearch.js, line 194 -
Check whether the specified document exists or not. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-exists">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-exists} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
existsSource(params, callback)
ElasticSearch.js, line 206 -
Check whether the source exists or not. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-existssource">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-existssource} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
explain(params, callback)
ElasticSearch.js, line 219 -
Provides detailed information about the specific document scores related to a specific query.It will tell you whether the document matches the specified query. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-explain">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-explain} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
fieldCaps(params, callback)
ElasticSearch.js, line 231 -
The function of allowing retrieval of fields between multiple indexes(Experimentation API,It may be deleted in the next versions). Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-fieldcaps">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-fieldcaps} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
get(params, callback)
ElasticSearch.js, line 244 -
Get a JSON document based on the type of it's ID from the index. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-get">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-get} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
getScript(params, callback)
ElasticSearch.js, line 256 -
Get script. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-getscript">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-getscript} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html">www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
getSource(params, callback)
ElasticSearch.js, line 268 -
Get source by index,type and ID. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-getsource">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-getsource} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
getTemplate(params, callback)
ElasticSearch.js, line 280 -
Get template. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-gettemplate">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-gettemplate} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
index(params, callback)
ElasticSearch.js, line 292 -
Storage a keyed JSON documents in index to make it searchable. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-index">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-index} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index\_.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-index\_.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
info(params, callback)
ElasticSearch.js, line 304 -
Get the basic information from the current cluster. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-info">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-info} More information reference href="http://www.elastic.co/guide/index.html">www.elastic.co/guide/index.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
mget(params, callback)
ElasticSearch.js, line 316 -
Get more than one document by index, type(option) and ids.The subject that mget need has two format:array of DOC positon or array of DOC ID. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-mget">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-mget} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
msearch(params, callback)
ElasticSearch.js, line 328 -
Executing multiple search requests in the same request. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearch">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearch} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
msearchTemplate(params, callback)
ElasticSearch.js, line 350 -
Execution multiple search template requests in the same request. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearchtemplate">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearchtemplate} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
mtermvectors(params, callback)
ElasticSearch.js, line 362 -
Termvectors api allowed to get more than one at a time termvectors. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-mtermvectors">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-mtermvectors} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
ping(params, callback)
ElasticSearch.js, line 374 -
Test the link. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-ping">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-ping} More information reference href="http://www.elastic.co/guide/index.html">www.elastic.co/guide/index.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
putScript(params, callback)
ElasticSearch.js, line 386 -
Add script. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-putscript">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-putscript} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html">www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
putTemplate(params, callback)
ElasticSearch.js, line 398 -
Add template. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-puttemplate">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-puttemplate} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
reindex(params, callback)
ElasticSearch.js, line 410 -
Reindex. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-reindex">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-reindex} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
reindexRessrottle(params, callback)
ElasticSearch.js, line 422 -
Reindex. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-reindexrethrottle">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-reindexrethrottle} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
renderSearchTemplate(params, callback)
ElasticSearch.js, line 434 -
Search template. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-rendersearchtemplate">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-rendersearchtemplate} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
scroll(params, callback)
ElasticSearch.js, line 446 -
Scrolling search requests (retrieving the next set of results) after the rolling parameter is specified in the search (). Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-scroll">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-scroll} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
search(params, callback)
ElasticSearch.js, line 458 -
Scrolling search requests (retrieving the next set of results) after the rolling parameter is specified in the search (). Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
searchShards(params, callback)
ElasticSearch.js, line 479 -
Returns the index and slice to execute the search request. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchshards">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchshards} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
searchTemplate(params, callback)
ElasticSearch.js, line 491 -
Search template. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchtemplate">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchtemplate} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
setGeoFence(geoFence)
ElasticSearch.js, line 88 -
et the geographical enclosure,It's valid when the openGeoFence is true.
Name Type Description geoFence
SuperMap.Geometry The geographical enclosure.
-
suggest(params, callback)
ElasticSearch.js, line 503 -
The proposed function recommends similar terms based on the text provided by using specific advisers. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-suggest">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-suggest} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html">www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
termvectors(params, callback)
ElasticSearch.js, line 515 -
Return the terminology information and statistical information about in the specific DOC fields. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-termvectors">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-termvectors} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
update(params, callback)
ElasticSearch.js, line 539 -
Update the doc by query API. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-updatebyquery">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-updatebyquery} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.
-
update(params, callback)
ElasticSearch.js, line 527 -
Update the part of the doc. Parameter setting reference href="http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-update">www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-update} More information reference href="http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html">www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html}
Name Type Description params
Object params.
callback
function The callback of result data returned by the server side.