Search Enhancement Mod

Started by ioszilla, August 12, 2007, 05:53:15 PM

Previous topic - Next topic

ioszilla

videoed, thanks for sharing your translation. I appreciate it. It's now a part of the latest mod 1.1.8. :)

p.s. I did a search for "adios" on your forum: http://www.videoedicion.org/foro/index.php, and there were loads of irrelevant results. Perhaps your forum is affected by this SMF bug as well?


Ramón Cutanda

#61
Quote from: wordzilla on August 20, 2007, 03:22:36 PM
videoed, thanks for sharing your translation. I appreciate it. It's now a part of the latest mod 1.1.8. :)

I'm glad to hear that! It's always a pleasure to contribute somehow

Quotep.s. I did a search for "adios" on your forum: http://www.videoedicion.org/foro/index.php, and there were loads of irrelevant results. Perhaps your forum is affected by this SMF bug as well?

Well... pehaps you were too quick! The thing is I published my post with the translation BEFORE I actually installed the mod in my site and, after installing it, I made some aesthetic changes, erase my custom index, create the full index...

You probably did the search in the middle of all those changes. I've tried your search with perfects result, so I don't think I'm affected  by the bug. I've been doing some tests and everything seems to work OK.

Thanks again!

saosangmo

Can anyone send me the Search.php file of SMF 1.1.3 which has been installed this mod, my file contains some errors. thanks

Ramón Cutanda

Quote from: saosangmo on August 21, 2007, 01:02:18 PM
Can anyone send me the Search.php file of SMF 1.1.3 which has been installed this mod, my file contains some errors. thanks

If you need some "fresh" files the most sensible thing to do is to download again the distribution pack. You will find search.php there

http://www.simplemachines.org/download/

ioszilla

@saosangmo: I agree with videoed. Anyway I have permission to send your the file direct (only) via PM. :)


Just a update:

It's been 2 months since we started experimenting with this new search on our DonationCoder.com forum. Since the modification to the original search function in SMF is extensive, we've been keeping an eye on it -- administrators are notified via email of forum errors and warnings immediately, and feedback threads are open to forum members for bug reporting etc.

Good news is that in the last consecutive 30+ days we haven't got any error notifications related to our new search function and forum feedbacks have been all positive so far.

I personally would like to consider this modification stable, however if you see:

1. Any errors/warnings in your SMF forum error log that you believe are related to this mod
2. Irrelevant/poorly ranked search results
3. Missing results
4. Search performance issues

...or other search-related problems, please do not hesitate to post about them here to help us improve. :)

saosangmo

okie, my hack may be wrong in some steps. I'm checking it.

And I have one question. I want my members who sign in can use this search function. And guests can't view and can't use this search too.

how do I modify my SMF?
Many thanks.

saw

Recently I had a lot of work done on my forum. Just as I was wrapping up, I noticed this mod had become available. To be honest the chief attraction at first was the dropdown menu (I'm so shallow).   Anyway, all I wanted to say was thank you. It's brilliant.

saosangmo

#67
When I search something, It displays this error.
QuoteUnknown error
File: /home/congcumi/public_html/hty/Sources/Search.php
Line: 1392

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.3, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.

My SMF is 1.1.3 and I executed upgrade.php

plz help me!

PS:
my line 1383->1392
Quote
               db_query("
                  INSERT IGNORE INTO {$db_prefix}" . ($createTemporary ? 'tmp_' : '') . "log_search_topics
                     (" . ($createTemporary ? '' : 'ID_SEARCH, ') . "ID_TOPIC)
                  SELECT " . ($createTemporary ? '' : $_SESSION['search_cache']['ID_SEARCH'] . ', ') . "t.ID_TOPIC
                  FROM (" . implode(', ', $subject_query['from']) . ')' . (empty($subject_query['left_join']) ? '' : "
                     LEFT JOIN " . implode("
                     LEFT JOIN ", $subject_query['left_join'])) . "
                  WHERE " . implode("
                     AND ", $subject_query['where']) . (empty($modSettings['search_max_results']) ? '' : "
                  LIMIT " . ($modSettings['search_max_results'] - $numSubjectResults)), __FILE__, __LINE__);

ioszilla

@saosangmo: I have sent you the file as requested.

I cannot seem to locate the code block around line 1392, was your search.php modified some other mod?

@saw: Thanks :) Glad it's working for you.

saosangmo

hi wordzilla, I install your mod on the newest version of SMF and have NO mod on it.
I'll try your file, many thanks

ioszilla

Quote from: saosangmo on August 24, 2007, 07:06:50 AM
hi wordzilla, I install your mod on the newest version of SMF and have NO mod on it.
I'll try your file, many thanks

Cool, then you don't need to upload the file I sent you. :)

Are you still getting this error?
QuoteNote: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.3, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.

saosangmo

#71
yes, some log I got from CPanel

CPU Exceeded:
Tue Aug 21 10:56:53 2007: used  36.00 seconds of cpu time for Mysql query
I'm using Vietnamese Language with UTF-8. When I input the the term with more than 20 characters the errors occur.





ioszilla

Do you have and use any search index (custom/fulltext) for your forum?

If any index is used to speed up the search, there really shouldn't be a cpu load problem (unless your forum is hosted on a host that oversells a lot). I don't think this mod consumes noticeably more resources than official smf search does.


NOTE: So far this mod is *proven* to work on English, French, Spanish, German language forums.

Also I'm confident to say that there *should not* be any problem for it to work as expected on: Albanian, Brazilian, Catalan, Danish, Dutch, Finnish, Portuguese, Norwegian, Croatian, Hungarian, Polish, Romanian, and Turkish forums.

I have NOT tested this mod on non-Latin language forums.


With regard to your Cpanel error:

1. Do you have and use any search index (custom/fulltext) for your forum?
2. Did this error exist before your installation of this mod?

saosangmo

I have configured with your note:

1. Use FullText index (Search index -> FullText index)
2. Leave "Force the use of a search index" UNchecked
3. Leave "match whole words only" UNchecked
4. Maximum results to show: 0  (0: no limit)

I'm on Bluehost.com

The error only occurs after I install your mod, :(

ioszilla

OK, could you switch search index to "custom index" and see if cpu load improves?

saosangmo

My forum works well when I empty all of search_log table.
thanks for your mod

yume_kokoro

Thanks very much for this mod!

I was a little worried at first because I couldn't make the specified changes to index.template.php - I think due to the fact that I use TP...

- but the mod seems to be working perfectly regardless.
wtf-anime.com [nofollow]
Looking for Anime/Manga sites to Affiliate with.
Contact via http://wtf-anime.com/index.php?action=contact [nofollow]

ioszilla

thx for using my mod. :)

I tried a few searches on your forum - it worked well but not as best as it could.

Just a reminder: To get the most out of this mod, make sure you follow the instructions in this post and configure your SMF accordingly - no hassles and takes only a minute.

Doughboy

I'm using 1.1.2 and installed the mod which worked fine, no problem there.

The only quirk I noticed is that when you move from main index to board to post, the drop down box doesn't change like on this board.  For example when you go to a post on this board the drop down box auto changes to "this topic".  Any ideas?

Thanks in advance because I love the mod.

ioszilla

This is not a bug, but intended behavior, as described here:  http://www.simplemachines.org/community/index.php?topic=188513.msg1200269#msg1200269  :)

I think in most cases people will prefer searching entire forum to searching within individual boards/topics. Therefore "entire forum" is the default scope of search unless specified otherwise.


I haven't yet tested it on 1.1.2 but glad to know it's working for you. :)

Advertisement: