Re: How do I build a search engine for a MySQL database?
Iman, I read this article yesterday in the morning. :-) The new full text search function of MySQL 4beta is exaclty what I'm looking for. There is only a problem... I don't think my university is going to upgrade to a beta version of MySQL, so I need a perl "search algorithm" instead. Thanks a lot. - Oriol -
Re: How do I build a search engine for a MySQL database?
Thanks, Kris. I probably expressed myself very bad... Actually I have done almost all the work. That means that I know how to connect to a database and how to "manually" build SQL statements in order to do a search. But I have a big problem: I don't know how to analize complex text queries and converting them to SQL select statements. For example: entering "preposition (place OR time)" in a text field and getting the corresponding select statement. I cannot analize myself the text query from an HTML form because I don't know how to do it through regexps. So, the first option is to enter only simple queries and then I add the % wildcard myself to the select statement, but it is not very useful. The perl modules I found in CPAN (Text-Query and Text-Query-SQL) convert complex text queries in Altavista syntax to SQL statements, but they don't put the % wildcard to the query words. These modules allow me to do more or less successful queries, but if I enter the text quoted above -- preposition (place OR time) -- the result does not include all the database entries with "prepositions" (the plural) and it is a bit annoying... Thanks, - Oriol -
How do I build a search engine for a MySQL database?
Hi, I'm running MySQL and Perl 5.6 on a Win32 machine. I'm a very unexperienced Perl programmer, but I need to build a serach engine for a MySQL database which parses the values entered in a text field (in simple and advanced query sintaxes similar to those used in Yahoo or Altavista) and builds "select" query strings. I've had some success using Text-Query and Text-Query-SQL modules from cpan. But surprisingly these modules don't suport the use of wildcards (or I havn't discovered how to use them) and I can only search for exact matches in the database. Can anybody help me? Are there alternative modules? I'm not prepared to create my own Text-Query parser by using raw regexps by now... Thanks, Oriol.