menwn Posted January 2, 2007 Share Posted January 2, 2007 Hi everyone,I have 2 problems building a search engine in mysql.1. I have a rather small database about 280mb containing Greek laws. It has two tables in it and I want to perform searches using phrases containing wildcards. I want for example to be able to search "app* mac*" and get results that have not the two possible words somewhere in the text but as a phrase either like application mackintosh or apple machine for example. This is extremely usefull in greek. I know that +app* +mac* will give me the two words definetely in the text but not as a phrase.Is this fisible? I use fulltext search but for now nothing. I know that boolean search is not designed to do something like this but is there any way to manage it?2. Why it takes so long to search after i use a left join between the two tables? When I search each table separately everything works pretty fast. Do I have to make a common index? if yes how?I am a newbie in all this so any help would be extremely appreciated. Thanks in advancemenwn Link to comment https://forums.phpfreaks.com/topic/32595-php-mysql-search-engine/ Share on other sites More sharing options...
Eugene Posted January 2, 2007 Share Posted January 2, 2007 [code=php:0]SELECT table1.fielda, table2.fielda FROM table1, table2 WHERE table1.fielda REGEXP '+app*' OR table1.fielda REGEXP '+mac*'[/code]I hope that helps. Link to comment https://forums.phpfreaks.com/topic/32595-php-mysql-search-engine/#findComment-151604 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.