From: Jon M. <jo...@te...> - 2006-03-13 14:33:49
|
Peter Crowther wrote: >>From: Colin Tatham >>I think there are two possible approaches: >> >>1. Use regular expressions to find possible matches of the >>search term >>in the identical_table Hashtable keys, or >> >>2. Execute an SQL query with wildcards on the table that contains the >>tokens. >> >> > >3. Bite the bullet, throw away the homebrew XML repository and use >somebody else's work. My candidate would be eXist, which has much of >this functionality already built in to XQuery. > > - Peter > > Or Apache Xindice? I'm not familiar with the product but one would hope that it has as much support behind it as the other Apache XML tools. Before taking this radical approach it would be important to determine that the replacement would be equally capable. (E.g. capable of handling accent insensitive searching which is vital for searching non-english text by users who aren't sure how to type accented characters into the search tool or for searching text which may have optional accents or incorrect orthography, not to say Japanese text which may have been entered in either of two phonetic systems.) Sticking with the Bodington XML query tool I'd say there is another option to your two: add a 'loose match' word matching field to tertiary, secondary, primary and exact. However, I don't think that would be the prefered option - I'd go for your option 2. So a search for 'open' AND 'source' would trigger an initial SQL query whose results would be used to create an altered query like ('open' OR 'opening') AND ('source' OR 'sources') before being executed. It will be sad to see the XML repository go - I'm very proud of the concept of translating an object oriented XML search specification into a single SQL query. It works very well with databases that can highly optimise the resultant query. Of course it's becoming redundant as a number of pure XML database products become available that are well optimised to XPath type searches. I'd be interested to see performance comparisons between my XML to SQL translator and a pure XML database like Xindice. Jon |