How do I add an invidual entry to a Verity collection?
As you know, the <cfindex> tag allows you to populate a Verity collection. This data can come from the file system (by using either a directory or just a file) or with a custom query.
Once the collection is populated, you do not need to clear the collection to do minor updates. You can use <cfindex> to add content as well. So for example, this code block will add a new file to the collection:
<cfindex action="update" collection="docs" type="file" key="c:\mydocs\new.pdf">
You can also use <cfindex> to remove an item as well. If the file used above was deleted, the following code should be used to keep the collection in sync:
<cfindex action="delete" collection="docs" type="file" key="c:\mydocs\new.pdf">
This question was written by Raymond Camden
It was last updated on April 18, 2006.