Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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!
 



 
jefazo666Send private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post 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.  

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!   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.  
 



 
mortSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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


  

 

  cron