QuickSearch - How Does It Works?


Subject: QuickSearch - How Does It Works?
Hi all, I have made a full search, but no results returned to this keyword.

I am speaking about the automatic quick search that we can see when we create a new topic, and we write the subject, or title. There is a line (seems Ajax), down this text input that tells the user that there are some themes with the same keywords on their titles.

I do not understand how this works. I have three topics, with this three titles:

word1
word2
word1 word2

when I try to create a fourth topic:
if I enter only word1, only two results are returned. This is ok.
if I enter only word2, again, two results are returned. This is also ok.
if I enter word1 word2, again 2 results are returned, I do not understand.
if I enter word3, nothing is returned, this is ok.
if I enter word3 word1, nothing is returned, I am beginning to understand.

So, does it searches only for the first word? It is possible to search for all words? What if the users begins it topic with "how" word, or hello? does this checks for small words like A, the, of, with ... ?

Thanks a lot for the answers!

Profile PM  
Subject: Re: QuickSearch - How Does It Works?
From what I've read into the script, IP strips anything less than three characters "if searchword < 3 - scrap it" etc. :mrgreen:

Edit:

As a matter of fact, it's this part of the script.

Code: [Download] [Hide] [Select]
// 'words' that consist of <3 or >20 characters are removed.
$entry = preg_replace('/[ ]([\S]{1,2}|[\S]{21,})[ ]/',' ', $entry);


And I ain't no preg_expert! :mricy: But something is telling me that <= or >= has gone astray, and nothing is equal to 3 or 20

Code: [Download] [Hide] [Select]
Maybe it needs a if($entry <= 3){echo 'Dude! you need more than three characters';};


Dunno,

But if anything else - It'll feed the spiders. :LOL:

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.5623s (PHP: 3% SQL: 97%)
SQL queries: 15 - Debug Off - GZIP Enabled