Question

I have a collection of files which have been added to a verity collection. The filename, with complete path, has been used as the key.

I would like to move the location of the files on disk, but I am concerned that I will end up with duplicate entries (when I update the same file, the path to the file will be different, so I'll have an entry for the old file and an entry for the new one).

I wasn't involved with the original application setup, and I don't know much about verity or coldfusion (the rest of the app is in PHP). Can anyone suggest how I can go about running some sort of regex replace on each key in a verity collection, or possibly suggest another approach?

Was it helpful?

Solution

I would recommend to create new collection, adjust to your new specs (at least new path in your case) and swich to it in the application code (replace the collection name in cfindex/cfsearch).

After making sure it works properly you are free to delete the old one.

If you can not create collection for some reason, you can simply purge the collection, switch the path and re-index it.

Please note that you can do all of this directly from the application (maybe temporarily script) using cfcollection tag, and using CF Admin (see Verity Collections in menu) too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top