I'm building a document management application where I want to be able to index BOTH binary document data (word, excel, powerpoint, rtf, PDF, etc.) AND database data in the same collection; simply, a user can upload a document, and when they upload the document, they can also save a variety of data (title, author, keywords, etc.) to a related database table. However, not all of the records in the database will have corresponding files (all files will have database records).
The issue is that when indexing database content, you generally use the PK for the table as the "key" field in the collection when you use an "update" action on the cfindex. However, when documenting files, the key gets set as the physical file location that was indexed. This means that if I were to add both document and database content to a collection, all of the document records would have duplicate records (the database portion). I would like to avoid this. Has anyone dealt with this problem, and if so, how did you proceed? What I am thinking of doing is actually having two collections, a "temp" collection that indexes ONLY the files, and the "real" collection that indexes the databse; when a new record is created, I create the DB record in the index from a DB resultset, then I index the file in the temp collection, then I retrieve that files' record from the temp collection and update the DB collection using the database primary key. Any flaws in this approach? Thanks Pete ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290425 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

