Jump to content

Recommended Posts

Hi,

 

I can work many aspects of full-text searching, however what 'they' call the 50% threshold still kicks me every time.

 

Say I construct data in a table which is all very relevant / similar, then the returned results are either none, or the relevance's are all the same.

 

Say here's a table definition:

CREATE TABLE test_search (id int not null primary key auto_increment, title varchar(128), info text, FULLTEXT(title,info) )

 

And into I put the following data:

INSERT INTO test_search VALUES
	('','One','jelly fish'),
	('','Two','jelly fish jelly fish'),
	('','Three','jelly fish jelly fish jelly fish'),
	('','Four','jelly fish jelly fish jelly fish'),
	('','Five','jelly fish jelly fish jelly fish jelly fish jelly fish'),
	('','Six','jelly'),
	('','Seven','jelly welly'),
	('','Eight','jelly boot')

 

Then a query of:

SELECT title, info, MATCH(title, info) AGAINST('fish') AS relevance FROM test_search WHERE MATCH(title, info) AGAINST('fish')

yields absolutely no results...

 

On the other hand if I initially set the table data to:

INSERT INTO test_search VALUES
	('','One','jelly fish'),
	('','Two','jelly fish jelly fish'),
	('','Six','jelly'),
	('','Seven','jelly welly'),
	('','Eight','jelly boot')

then I get two results, each with the same relevance, even though one result should be twice as good as the other...

 

WHY? HOW? PLEASE!

Link to comment
https://forums.phpfreaks.com/topic/190372-full-text-searching-the-50-threshold/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.