Problem with Search Function

Started by Alsan, July 21, 2010, 09:58:45 AM

Previous topic - Next topic

Alsan

Hiho,

I've been lurking around the forums as a guest for quite a while now, and always found what I was looking for. Thanks for that. :) This time it's different, though, and I hope you can help me.

I'm currently working on a custom theme for a 500k+ posts forum that will in the near future be ported from wBB 2 to SMF. When I was working on the search function I noticed a strange behaviour:

Say I have a thread with 3 posts, each of which contains the keyword. When I perform a search for that keyword, only the most recent post is shown as a result. Why are the other two (or more) posts invisible? When I do a search for posts, I would expect all posts to be shown as separate results, despite of them being in the same topic.

Is this a bug, a feature, or am I just misunderstanding the whole search form?

Thanks in advance,
Alsan

PS: The forum runs locally on XAMPP and is synchronized via a SVN repository, if that helps.

gbsothere

Well, let me tell you what I just did on my test board, Alsan, since, at first, I was having your problem.  I created several threads with the same keyword, but was only getting one result.  I went to Admin==> Search and Search Methods and checked the button by "full text" and clicked the link there to "create fulltext index".   I put a check in the "force the use of a search index" and saved those changes.  Then I went to "Settings" and and checked "Enable Simple Search" and saved it.  Now, I'm getting all the results of threads with that keyword.   Try it and see if it changes things for you?
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Alsan

Hi,

thanks for your help. :)

Unfortunately, it doesn't change anything. Actually, a full text index did already exist and "force the use of a search index" was also checked. I also tried simple search and played around with the different indices (deleted/created custom index as well as full text index several times).

Additionally, a interesting thing I noticed: A SMF 1.1.11 forum which I am a member of does the same – only the most recent post of a topic matching the search criteria is shown as a result.

gbsothere

That's odd that it works on my board but not yours....   

These are my weight settings (yours are probably close or the same; these are default):


Help Relative search weight for number of matching messages within a topic:
    30%

Help Relative search weight for age of last matching message:
    25%

Help Relative search weight for topic length:
    20%

Help Relative search weight for a matching subject:
    15%

Help Relative search weight for a first message match:
    10%

Help Relative search weight for a sticky topic:
    0%
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Alsan

Yes, I just checked and have the same weight settings.

I also tested it in another independent instance of SMF (2.0 RC2) I have installed locally some time ago, and (surprise) it shows the same behaviour. ^^

Alsan

Alsan

Sorry for the double post, but:

You can check it with the search function of this board right here. Search for my nickname. The results are a bunch of older posts from the turkish forums, and only one post from this topic – although I posted my name in two of them.

gbsothere

That's odd.  It makes me wonder, though.  I know that MySQL users must have the CREATE TEMPORARY TABLES privilege for using the search function.   I wonder if you have that turned on?  (Or, if you're "root" I guess that doesn't apply.)   :-\
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Alsan

Yes, CREATE TEMPORARY TABLES is enabled.

I begin to wonder whether it's a general problem with SMF? When it's even reproducable in the official forums?


Oh, and by the way congratulations on your avatar, gbsothere. ^^

gbsothere

Quote from: Alsan on July 21, 2010, 06:22:07 PM
Yes, CREATE TEMPORARY TABLES is enabled.

I begin to wonder whether it's a general problem with SMF? When it's even reproducable in the official forums?


Oh, and by the way congratulations on your avatar, gbsothere. ^^



Thank you, Alsan; that's my granddaughter.   *grin*   She's 5 months, now; I'll have to get a more recent pic.


I tell you, it stumps me about the search thing.  I usually do find more than one result here, even when I enclose my request in quotation marks, but I've seen others complain about this same site not giving them sufficient results.  I just can't think why my test forum would yield a different amount of results than yours, since our settings are pretty much the same.  That's why I wondered about the server thing. 

Speaking of "search".....    I'll settle in and move around the boards and see if I can find someone else with this issue who actually got it resolved.  *fingers crossed*
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Norv

Hello there,
and welcome to SMF!

I believe that unfortunately you came upon a bug in SMF 2.0 RC3, if I understand the problem correctly (Bug #2201: Search - Show results as messages - 1 hit per topic). I am not entirely certain what happens for gbsothere, if that is the case, though. :)
You may want to note however that it is solved for the next version.
Also, you may want to know that boards with 500k posts as you mention, are welcome to join the Big Boards group on this forum (once it is on SMF, of course), which will offer a special forum for specific big board discussions, tips sharing and tools, among which for search - as this is one of the area which need special attention as the forum grows.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Tjati

Hey guys,

@Norv:
For the bug there's a patch file attached. But i'm quite not sure if it's the solution for the bug?
Is there any patch file for this bug?
We (Alsan and me) have an own working copy of the smf because we had modified it heavy.

Advertisement: