Inserts/Updates a file into the collection. The key is the unique file 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 = CollectionIndexfile( collection, key, title, summary, author, category, categorytree, urlpath, custommap, query )
Argument Summary
collection the name of the collection
key the full path of the file to index. If a document already exists, it will be removed and replaced with this one. If 'query' present, this is the column where the file is found
title title for the document. If 'query' present this is a column name [optional]
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:

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


For more information on searching please visit Searching within OpenBD CFML