移动 verity 集合中的文件
我有一个已添加到真实集合中的文件集合。文件名和完整路径已被用作密钥。
我想移动磁盘上文件的位置,但我担心最终会出现重复的条目(当我更新同一文件时,该文件的路径将会不同,因此我将有一个条目旧文件和新文件的条目)。
我没有参与原始应用程序的设置,并且我对 verity 或 Coldfusion 不太了解(应用程序的其余部分是用 PHP 编写的)。谁能建议我如何在 verity 集合中的每个键上运行某种正则表达式替换,或者可能建议另一种方法?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议创建新的集合,调整您的新规范(至少在您的情况下是新路径)并在应用程序代码中切换到它(替换 cfindex/cfsearch 中的集合名称)。
确保它正常工作后,您可以删除旧的。
如果由于某种原因无法创建集合,您可以简单地清除集合,切换路径并重新索引。
请注意,您可以使用 cfcollection 标签,并使用 CF Admin(请参阅菜单中的 Verity Collections)。
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.