Author Topic: [SOLVED] Search by groups  (Read 4360 times)

alagoz

  • Guest
[SOLVED] Search by groups
« on: October 28, 2007, 09:55:35 AM »
Serch by groups function does not produce any results. You can check it in the demo site www.phpmotion.net. A quick fix would be great.
« Last Edit: November 05, 2007, 07:26:32 PM by CarAudioClips »

AL

  • Jr. Member
  • **
  • Posts: 105
Re: Search by groups
« Reply #1 on: October 29, 2007, 10:09:04 PM »
interesting works great to me I just checked

alagoz

  • Guest
Re: Search by groups
« Reply #2 on: October 30, 2007, 07:08:21 PM »
Did you check the phpmotion.net? Although there is a group named nnn, it does not display any results when you search for it. You should have corrected it somehow!

AL

  • Jr. Member
  • **
  • Posts: 105
Re: Search by groups
« Reply #3 on: October 30, 2007, 10:32:26 PM »
Yes I did test the demo site but the keyword I used was test and it showed up !!
But now I see what your talking about ...
I think this its the same problem with the search for videos some tags read some show no results....
Oac said inmotion made video seach this way to only allow unique keywords like youtube.. If you have a tag thats repeated a few times it will not show ...but hey that was the video search not groups mabe its a bug :-\...

Any one care to take a look at this.................

henry

  • Newbie
  • *
  • Posts: 42
Re: Search by groups
« Reply #4 on: October 31, 2007, 11:57:47 AM »
The search in phpmotion uses MATCH AGAINST keyword on a FULL TEXT ed Title , Tag and Description fields. MySQL adds a little bit of intelligence to the search by a few methods. One of them is that search word with three or less words are ignored. I was having problems with words like SUV, CEV till i found this out. Also, it ignors words that produce thousands of results. Words like in, but, and etc are everywhere in titles and descriptions. It is a good idea to ignoere them. If you still want to have words like SUV etc show up in your results, modify the search.php code slightly such that if the stringent searches do not return anything, you use another search using LIKE %keyword_escaped%. This will return a good number of records.

AL

  • Jr. Member
  • **
  • Posts: 105
Re: Search by groups
« Reply #5 on: October 31, 2007, 03:08:07 PM »
Can you post what codes are needed to allow less than three letters PLEASE

henry

  • Newbie
  • *
  • Posts: 42
Re: Search by groups
« Reply #6 on: November 01, 2007, 11:35:58 AM »
What i did is in case the good and intelligent search doesnt return anything (that is the one with MATCH AGAINST ) then i add this small bit using SQL  keyword LIKE.

if (empty($result_search))

{

$sql = "SELECT * FROM videos WHERE title like '%$keyword_escaped%' or tags like '%$keyword_escaped%' or description like '%$keyword_escaped%' AND approved='yes' AND public_private = 'public' LIMIT $set_limit, $limit";
    $query = @mysql_query($sql);
    while ($result1 = @mysql_fetch_array($query))
}

Hope this helps

       

AL

  • Jr. Member
  • **
  • Posts: 105
Re: Search by groups
« Reply #7 on: November 01, 2007, 02:22:24 PM »
Thanks I got it working last night !!!!!!! & I also updated videos search with same....... See this post
http://phpmotion.com/forum/index.php?topic=1495.0

Works Great PPL.............. ;D
« Last Edit: November 01, 2007, 02:25:38 PM by AL »

sbcjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6247
    • PHPmotion Mods
Re: [SOLVED] Search by groups
« Reply #8 on: April 12, 2009, 11:08:06 PM »
Where do i need to change this directive for works search by groups?

Try this mod:
http://phpmotion.com/forum/index.php/topic,11223.0.html