Inserts/Updates a document into the collection. The key is the unique identifier for each document. Each field in the document can be searched against. If a query is presented then the fields represent columns into the query. If the column does not exist then an exception is thrown. The index can still be searched while an update is happening, however the new documents will not be available in the search until this operation has completed. Note that all fields are treated as strings and will be indexed accordingly.


STRUCTURE = CollectionIndexcustom( collection, key, body, title, summary, author, category, categorytree, urlpath, custommap, query )
Argument Summary
collection the name of the collection
key the unique identifier for this document. If a document already exists, it will be removed and replaced with this one. If 'query' present, this is the column where the key is found
body the main content for this document. Depending on whether you have flagged the collection to store the body determines whether or not this is presented back in the results. It is advised not to store large quantities with the index. If 'query' present, this is the column where the content is found. You can specify a comma separated list of column names for multiple columns
title title for the document. If 'query' present this is a column name
summary summary for the document. If 'query' present this is a column name. This column is not indexed, merely stored as a reference [optional]
author author for the document. If 'query' present this is a column name [optional]
category one or more categores, separated by a comma separated list. If 'query' present this is a column name [optional]
categorytree the categorytree for this particular document. If 'query' present this is a column name [optional]
urlpath the urlpath of this document. If 'query' present this is a column name [optional]
custommap a structure of custom atttributes that will be added to the document and indexed. The key of the structure element will be the field name and the value will be indexed. You can specify as many custom attributes as required. Each one is stored in the index as well. If 'query' then this is used for column names [optional]
query the query representing all the rows to add to this index. [optional]


Supports named-parameter calling allowing you to use the function like:


Supports passing parameters as a structure using ArgumentCollection:

CollectionIndexcustom( ArgumentCollection={
   collection : ?, 
   key : ?, 
   body : ?, 
   title : ?, 
   summary : ?, 
   author : ?, 
   category : ?, 
   categorytree : ?, 
   urlpath : ?, 
   custommap : ?, 
   query : ?
} );


For more information on searching please visit Searching within OpenBD CFML