Advertisement:

Author Topic: Search problem  (Read 2774 times)

darko024

  • Newbie
  • *
  • Posts: 8
Search problem
« on: November 28, 2010, 06:12:37 am »
Hi,
I have poblem with search !
In search.php file this code
Code: [Select]
$search->addConditions(sprintf("(d.s_what LIKE '%%%s%%')", $pattern)); works but not right.
This return nothing (If the pattern is not found) or all classifieds (even those that do not contain pattern).
 

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Search problem
« Reply #1 on: November 29, 2010, 11:44:10 am »
Hi darko024,


In which file and line number did you find that? Because I checked and couldn't find that line in the whole project. Also, which version of OSClass are you currently using? With that information we'll be able to help you.


Thanks.

darko024

  • Newbie
  • *
  • Posts: 8
Re: Search problem
« Reply #2 on: November 29, 2010, 06:58:19 pm »
Probably you can not find it because the original code  looking for s_title s_description.
U can find it in WEB_APP. '/ search.php' around line 92-95.

Code: [Select]
$search->addConditions(sprintf("(d.s_title LIKE '%%%s%%' OR d.s_description LIKE '%%%s%%')", $pattern, $pattern));
I think it's better to use

Code: [Select]
$search->addConditions(sprintf("(d.s_what LIKE '%%%s%%' )", $pattern));
but search function does not work .

hirokamitai

  • Newbie
  • *
  • Posts: 14
Re: Search problem
« Reply #3 on: November 29, 2010, 08:26:17 pm »
Yes, I have the same problem using 1.0RC.  If i have these categories: red, blue, yellow, green, black and then I search for green, the result will show:
red
blue
yellow
green
black

If I search for brown, then I get no results shown.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Search problem
« Reply #4 on: November 30, 2010, 12:30:08 pm »
Yes, I have the same problem using 1.0RC.  If i have these categories: red, blue, yellow, green, black and then I search for green, the result will show:
red
blue
yellow
green
black

If I search for brown, then I get no results shown.

Categories or items?
We re-done the whole search system since 1.0RC, so it should work now as expected



Quote
but search function does not work .
Wow... we were aware that "sort results by relevance" is not working propertly, not this problem. We also have to improve the search forms, that's on our to-do list, we're working hard. But any any feedback is welcome, we'll try to debug the problem and make it works fine for next release.

Thanks

hirokamitai

  • Newbie
  • *
  • Posts: 14
Re: Search problem
« Reply #5 on: November 30, 2010, 05:51:22 pm »
In my previous post I  meant item and not category... ::)

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: Search problem
« Reply #6 on: December 01, 2010, 02:15:12 pm »
I'm sorry but I haven't understood... Can you explain it again? Thanks!!