lucee.Componentcbelasticsearch.Document
Elasticsearch Document Object
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
config
|
true
|
false
|
|
any
|
highlights
Highlights for the document in search results.
|
true
|
false
|
|
any
|
id
The `_id` value of the document.
|
true
|
false
|
|
any
|
index
The index which contains or will contain this document.
|
true
|
false
|
|
any
|
memento
The structural representation of the document object.
|
true
|
false
|
|
any
|
score
A hit score for documents in search results.
|
true
|
false
|
|
any
|
type
The type within the index where this document will be categorized.
|
true
|
false
|
Method Summary | |
---|---|
boolean
|
delete()
Deletes the currently active document. |
any
|
get([string id], [string index], [string type])
Loads a document. |
Client
|
getClient()
Client provider. |
string
|
getConfig()
|
struct
|
getDocument([boolean includeKey='false'])
Convenience method for a flattened struct of the memento. |
string
|
getHighlights()
|
string
|
getId()
|
string
|
getIndex()
|
string
|
getMemento()
|
string
|
getScore()
|
string
|
getType()
|
any
|
getValue(string key, [any default])
Gets a key value within the current document. |
Document
|
new([string index], [string type], [struct properties='[runtime expression]'])
Returns a new Document instance. |
any
|
onDIComplete()
|
Document
|
populate(struct properties)
Populates an existing document object. |
any
|
reset()
|
any
|
save()
Persists the document to Elasticsearch. |
any
|
setConfig(any config)
|
any
|
setHighlights(any highlights)
|
any
|
setId(any id)
|
any
|
setIndex(any index)
|
any
|
setMemento(any memento)
|
any
|
setScore(any score)
|
any
|
setType(any type)
|
any
|
setValue(string name, any value)
Sets a key value within the current document. |
string
|
toString([boolean includeKey='false'])
Returns the JSON string of the document object. |
Methods inherited from class lucee.Component |
---|
None |
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- Config@cbElasticsearchserializable
- trueHighlights for the document in search results
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe `_id` value of the document
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe index which contains or will contain this document
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe structural representation of the document object
access
- publicrequired
- falsereturntype
- anyserializable
- trueA hit score for documents in search results
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe type within the index where this document will be categorized
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Deletes the currently active document
Loads a document
id
- string The `_id` of the document to retrieveindex
- string The index of the documenttype
- string The type of the documentClient provider
Convenience method for a flattened struct of the memento
includeKey
- boolean Whether to include the document key in the returned packetGets a key value within the current document
key
- string the key to searchdefault
Returns a new Document instance
index
- string the index nametype
- string the index typeproperties
- struct the structural representation of the documentPopulates an existing document object
properties
- struct the structural representation of the documentPersists the document to Elasticsearch
config
highlights
id
index
memento
score
type
Sets a key value within the current document
name
- string the key namevalue
- string the key valueReturns the JSON string of the document object
includeKey
- boolean Whether to include the document key in the returned packet