Recent Topics

1 May 28, 2020 21:34    

Search Widget gives Unexpected Results

Hi. I wanted to update info on this years attempt at getting fruit from the pear trees, beofre the squirels get them all. So I search for the post using the search widget, The top result 100% has nothing to do with pears but I can fathom that somewher in thepost is the word 'appears'

The post titled Pear Crops and with the word pears only gets a score of 89%

It is because the top post has been edited more recently and the search sees that as the most favoured option?

3 May 29, 2020 00:53

If you enable debug mode while searching , you will get plenty of info on how the scores are calculated.

Yes we should do word matching.

4 May 29, 2020 01:09

After all these years I've never used the debug mode, scared of what I may find.


Where exactly is the search algorithym? I know I could look for it :)

5 May 29, 2020 01:25

OK Have just tried it. By the way I will propose a change to the manual.

The result confirms my suspision, a lot of weight is given to the last date the item was modified. There could be a choice on such options. I know it make sthe search more complicated, maybe.

Extra points for [last_mod_date]

8 points. Rule: The number of points are calculated based on the days passed since creation or last modification
days_passed < 5 => ( 8 - days_passed )
8 <= days_passed < 8 => 3
when days_passed >= 8: ( days_passed < 15 ? 2 : ( days_passed < 31 ? 1 : 0 ) )

Total: 16 points

This is the best result. Percentage value is calculated based on the number of matching words and matching quoted terms.
Note: In case of the number of matching words even case insensitive partial matches are counted.

6 May 29, 2020 13:01

Hi. It may be worth noting, or reminding users, that if the search keyword is placed in quotes with a space before and after, the results are as expected. I have noted this in the manual ~ with spelling mistakes that can't be edited by me :(

It may be a nice idea to have two options on the search widget [Full] and [Partial] that may popup when hovering over the [Search] submit button. Hmm! Searching for (Sea, or ear, would give . . . . )

Ideas for a user friendly option would be appreciated :)

Form is loading...

CMS + user community – This forum is powered by b2evolution CMS, a complete engine for your website.