Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search problem

Status
Not open for further replies.

albyh

Technical User
May 10, 2003
32
GB
Hi,

I've written the following query as a search on our site and for the most of it, it works quite well. The problem is it is behaving strangely in certain situations. The first query works perfectly:

SELECT muzenbr, MATCH (title) AGAINST ('thunder crack') +MATCH (artist)
AGAINST ('thunder crack') AS relevance FROM searchMusic WHERE MATCH (artist, title)
AGAINST ('+thunder +crack' IN BOOLEAN MODE) ORDER BY relevance DESC LIMIT 0,11

This brings up a single search result for Thunder - Back for the crack which is the only matching record. The problem however is with this query

SELECT muzenbr, MATCH (title) AGAINST ('shed seven') +MATCH (artist)
AGAINST ('shed seven') AS relevance FROM searchMusic WHERE MATCH (artist, title)
AGAINST ('+shed +seven' IN BOOLEAN MODE) ORDER BY relevance DESC LIMIT 0,11

The first 15 or so results only have the word shed in them and not seven. There are a large number of results with both shed and seven in them but they are not shown until the 15th result as apparently they are not as relevant.

Is it just me that things those results without the word seven shouldnt show up at all never mind be classed as the most relevant.

Any help here would be greatly appreciated as I just can't get my head around this one.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top