On Monday 07 October 2002 02:56 pm, Ken wrote: [snip]
I am using DocumentLibrary as a search engine, indexing remote pages and returning results pointing to the page on the remote server (the 'source' property). Thus, once the page is indexed I could delete it (as long as there is no need to reindex). But can I delete the original document and keep only the catalogued 'brain'?
Yes and no (depending on how hard you try). Probably the easiest way to do this would be to create a Subclass of DocumentFile that did not store the document data persistently, but fetched in on demand when the object was cataloged, and possibly redirected a browser to the remote URL when the document was accessed. This would not be difficult and would mostly involve overriding the add, edit and PrincipiaSearchSourch methods of DocumentFile. There is already code in there to fetch remote data (using urllib), so that parts already done. You could not get rid of the object entirely though, unless you created a traversal hook in the Documents object which pretended to make it exist. This is probably more trouble then it is worth though. As for using an external database (as was originally asked), I'm not sure why you would want to as most relational databases BLOB support is inefficient, but it could be accomplished in a similar manner, using database queries in place of urllib. -Casey
Anyone?
TIA,
Ken