Re: search results return by relevancy

From: Date: Thu, 19 Apr 2001 19:19:57 +0000
Subject: Re: search results return by relevancy
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-49405@lists.php.net to get a copy of this message
However, note that MySQL does not include stopwords in the FULLTEXT index --and it currently considers any word of three characters or less to be a "stopword". So if you really are searching for words as short as "cat", this isn't the solution (or else you're going to need to make some modifications to the MySQL source and re-compile). In article <200104191816.LAA17130@smtpout.mac.com>, clarence@mac.com (Clarence) wrote: > Try "MATCH (FULLTEXT index columns) AGAINST ('keyword')" > > Check the MySQL manual at: <http://www.mysql.com> and > search for "match > against" or "fulltext" > You need to build FULLTEXT indexes on the columns you want to search > before you can use the above syntax. > > However, it will search and sort by relevance. > > > On Thursday, April 19, 2001, at 09:56 AM, Jen Hall wrote: > > > Hi there > > I have some scripts that do a search in a MySQL database > > table. > > I want to be able to return rows that match a query, in > > order of relevancy. > > For example, say I have a table that has the following data > > > > |row_id| data > > |------|------------------------------------- > > | 1 | cat > > | 2 | cat cat > > | 3 | cat cat cat > > | 4 | cat cat > > | 5 | cat cat cat cat cat cat cat > > | 6 | cat > > | 7 | cat cat cat cat > > | 8 | cat cat cat cat cat -- CC

« previous php.general (#49405) next »