[Zope] Serving and Searching PDF's and Word Docs
Ian Sparks
isparks@wmute.u-net.com
Thu, 4 May 2000 01:54:40 +0100
> > What about searching the documents ?
> As mentioned above normal RDBMS will propably have some restrictions.
> I cannot image how to search a document within an RDBMS for a special
> word or phrase.
Well, if the data is stored in a text or BLOB field then you can do a SELECT
* FROM TABLE1 WHERE X IS LIKE '%searchterm%'.
There ARE problems with BLOB's in most RDBMS' but you could :
1. Store you raw data (the document) as a Binary Large Object (BLOB).
2. Store a set of separate records which are the search terms on your
objects :
tblDocs
ID DOC
1 <FILE INSERTED>
2 <FILE INSERTED>
tblTerms
TERM ID
marketing 1
sales 1
germany 1
software 2
microsoft 2
halloween 2
There's a lot of redundancy in this method but it can be done.
- Ian Sparks.