Post by Tim Penrose on Jan 2, 2006 23:16:22 GMT -5
Hello and welcome honored guest!!!
I'm in the process of implementing search right now. Its an ugly two-phase search. I've written the application as if a “repository” of nodes is something that is too large to be contained in memory. So the first phase of the search is done via a database query. The query returns a list of nodes. The user then selects one of the nodes from this list to initiate the second stage of the search. When the user selects a node, the “content handler” (which is specific to the node-type) is queried to locate instance(s) of the search text within the node.
The process gets uglier because node-content is designed to be unintelligible without the assistance of content-handlers. For example, the node-content for RTF is intertwined with control codes that make it NOT human-readable and NOT usable for database querying.
To make the first phase of the search work, the content handler's are tasked with generation of a text-only “meta” content type. This type is stored in the database in a column named SearchableContent. While this poses a substantial increase in storage requirements, it also allows for much more powerful and intelligent searching as the content-handlers gain savvy. For individual users, the higher storage costs are offset by the integrated compression. For corporate databases that are always running, these additional storage costs must be paid.
As you can see, “Search as you type” would be an expensive option for the database. But for a local user, who cares about that? I could probably make “search as you type” an option...
Thank you very much for your input and your interest. I hope you remain involved with something that will always be, in some ways, your baby.