Documents
Learn how to create and manage Elasticsearch document records using CBElasticsearch
Creating Documents
var book = getInstance( "Document@cbelasticsearch" ).new(
index = "bookshop",
type = "_doc",
properties = {
"title" = "Elasticsearch for Coldbox",
"summary" = "A great book on using Elasticsearch with the Coldbox framework",
"description" = "A long descriptio with examples on why this book is great",
"author" = {
"id" = 1,
"firstName" = "Jon",
"lastName" = "Clausen"
},
// date with specific format type
"publishDate" = dateTimeFormat( now(), "yyyy-mm-dd'T'HH:nn:ssZZ" ),
"edition" = 1,
"ISBN" = 123456789054321
}
);
book.save();Retrieving Documents
Updating Documents
Refreshing the Index At Save Time
Updating Individual Document Fields
Deleting Documents
Bulk Operations
Bulk Saving of Documents
Update by Query
Bulk Operation Parameters
Asynchronous Bulk Operations
Last updated
Was this helpful?