Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 05:11 am EST
Geeklog Forums
search - how to fix it
ok
i have beeen botherig dirk for the last two days about it
since all the texts used are quite old i created a new topic ...
******
today i started here
http://www.geeklog.net/search.php?query=maximum+execution+time&type=all&mode=search
this one
http://www.geeklog.net/forum/viewtopic.php?showtopic=47985
looks interesting; mostly couse of this:
we should not really forget about the search box, but limit it to last 7 days, as it was in the old days (as i remember)
& this
this one is nice, but i have lots of comments
so i am looking @ breaking
again
both @ the bottom
but, here (@ the bottom again)
http://www.geeklog.net/forum/viewtopic.php?showtopic=39896
i find
this one seems fairly easy to install
what's 'her' problem?
& here
i find another 'solution'
is this one even relevant?
did it get into geeklog till 11?
smaller chunks?
i suppose not
& i suppose this one is done too?
i mean did tony rework the search code?
... better ... is this issue still important
http://www.geeklog.net/forum/viewtopic.php?showtopic=16495
that's about all i find on geeklog regarding that issue
& ofcourse this one
It is a bug - in a way. The search function should only be returning a fixed amount of results per page instead of trying to return ALL results at once ...
I actually developed a partial solution for the problem at one point but never finished it (oh, oh - I hope I still have it somewhere ...). I also have someone's implementation that already does paging but is based on an older version of Geeklog and not too easy to implement.
I'd rather not add any of those as attachments here. E-Mail me if you want to have a go at it.
http://project.geeklog.net/tracker/index.php?func=detail&aid=274&group_id=6&atid=105
i emailed allready ...
if i missed something, please let me know ... link will do
so the first q is
is the ... one line limiting to 400 (ex.) results working?
why isn't it implemented?
is there a problem (i lost that page) with plugins or smthing
i am not using lots of them ... so ...
what's with that?
and the second one; why is quick search searching for all in all in all by default ?
i have beeen botherig dirk for the last two days about it
since all the texts used are quite old i created a new topic ...
******
today i started here
http://www.geeklog.net/search.php?query=maximum+execution+time&type=all&mode=search
this one
http://www.geeklog.net/forum/viewtopic.php?showtopic=47985
looks interesting; mostly couse of this:
Quote by beewee: Or we should forget the standard search box and only use the advanced search function (or an intermediate search box: select where to search: in articles/forum/files/links). This way people find what they need without searching the complete database. The chances of getting these embarassing timeouts could be reduced by about 95% I guess. Also better for the server load.
we should not really forget about the search box, but limit it to last 7 days, as it was in the old days (as i remember)
& this
Quote by ByteEnable: If you are php inclined, here is a workaround. This limits story search results to 400. Now, if you have lots of comments, it will break again.
In file:
system/classes/search.class.php
In file:
system/classes/search.class.php
this one is nice, but i have lots of comments
so i am looking @ breaking
again
both @ the bottom
but, here (@ the bottom again)
http://www.geeklog.net/forum/viewtopic.php?showtopic=39896
i find
Quote by ByteEnable:
while ( ($A = DB_fetchArray($result_stories)) && ($story_results->num_searchresults < 400) ) {
Text Formatted Code
while ( ($A = DB_fetchArray($result_stories)) && ($story_results->num_searchresults < 400) ) {
this one seems fairly easy to install
what's 'her' problem?
& here
i find another 'solution'
Quote by Dirk: If you have access to the php.ini, then is the line you are looking for.
Another option would be to use
Geeklog should really return the search results in smaller chunks, but that didn't make it into 1.3.8 ...
Text Formatted Code
max_execution_time = 30 ; Maximum execution time of each script, in secondsAnother option would be to use
set_time_limit(0);
somewhere in the script (if that's allowed).Geeklog should really return the search results in smaller chunks, but that didn't make it into 1.3.8 ...
is this one even relevant?
did it get into geeklog till 11?
smaller chunks?
i suppose not
& i suppose this one is done too?
Quote by rawdata: My guess is the timeout problem is caused by the way tables are being joined or duplicative results are being returned or both. Joining tables has a multiplicative effect. For example, if you have a table with 10 fields x 100 rows and join it with 10 fields x 100 rows, the dimension becomes 100 x 10,000. If you join another, it gets multiplied again and so on. Depending on the sql call, you can also compound the problem with duplicative results. Geeklog's site has less than 11,500 items to search. This total is nothing for MySQL to handle which leads me to believe one or both of these areas are the problem.
If it helps any, Tony is reworking the search code. Hopefully, he finds and fixes the problem. In the meantime, you can limit the results by narrowing your search criteria (ie select a specific date range, author, or a topic). The timeout seems to be only occurring when someone selects "All". You can always go into search.php and add a limit to the sql calls. If it's a join and/or duplicative problem though, it may only have a temporary effect until you add enough more new info to hit it again.
If it helps any, Tony is reworking the search code. Hopefully, he finds and fixes the problem. In the meantime, you can limit the results by narrowing your search criteria (ie select a specific date range, author, or a topic). The timeout seems to be only occurring when someone selects "All". You can always go into search.php and add a limit to the sql calls. If it's a join and/or duplicative problem though, it may only have a temporary effect until you add enough more new info to hit it again.
i mean did tony rework the search code?
... better ... is this issue still important
http://www.geeklog.net/forum/viewtopic.php?showtopic=16495
that's about all i find on geeklog regarding that issue
& ofcourse this one
It is a bug - in a way. The search function should only be returning a fixed amount of results per page instead of trying to return ALL results at once ...
I actually developed a partial solution for the problem at one point but never finished it (oh, oh - I hope I still have it somewhere ...). I also have someone's implementation that already does paging but is based on an older version of Geeklog and not too easy to implement.
I'd rather not add any of those as attachments here. E-Mail me if you want to have a go at it.
http://project.geeklog.net/tracker/index.php?func=detail&aid=274&group_id=6&atid=105
i emailed allready ...
if i missed something, please let me know ... link will do
so the first q is
is the ... one line limiting to 400 (ex.) results working?
why isn't it implemented?
is there a problem (i lost that page) with plugins or smthing
i am not using lots of them ... so ...
what's with that?
and the second one; why is quick search searching for all in all in all by default ?
8
7
Quote
here it is
ADDed in search.class.php geeklog
system/classes/search.class.php
Line : 1063
//if less than 3 char then show search form
if (strlen($this->_query) < 4) {
$searchObj = new Search();
$retval = $searchObj->showForm();
return $retval;
}
AND
line 301 (first fix the upper code)
changed:
while ($A = DB_fetchArray($result_stories)) {
// to
while ( ($A = DB_fetchArray($result_stories)) && ($story_results->num_searchresults < 200) ) {
// limits max results to 400 per (story, commnt, event, links) == 1600 alltogether @ large database & special search term (blank or letter not working anymore); this should result in bots not indexing the search results, but i think that with url rewrite, that should not represent a problem
oops
those repeat in:
301 :
while ( ($A = DB_fetchArray($result_stories)) && ($story_results->num_searchresults < 200) ) {
412 :
while ( ($A = DB_fetchArray($result_comments)) && ($comment_results->num_searchresults < 200) ) {
510 :
while ( ($A = DB_fetchArray($result_links)) && ($link_results->num_searchresults < 200) ) {
618 :
while ( ($A = DB_fetchArray($result_events)) && ($event_results->num_searchresults < 200) ) {
so ... would this be a problem to become ... standard geeklog feature with two variables added to config.php
max_search_results ; allready awaiting in config
+ commnt, event, links
+
min_search_chars ; // to insert into searchbox
this two (five?) would be nice ...
couse ... geek seems much faster now
not using all awailable cpu all the time too
ADDed in search.class.php geeklog
system/classes/search.class.php
Line : 1063
Text Formatted Code
//if less than 3 char then show search form
if (strlen($this->_query) < 4) {
$searchObj = new Search();
$retval = $searchObj->showForm();
return $retval;
}
AND
line 301 (first fix the upper code)
changed:
Text Formatted Code
while ($A = DB_fetchArray($result_stories)) {
// to
while ( ($A = DB_fetchArray($result_stories)) && ($story_results->num_searchresults < 200) ) {
// limits max results to 400 per (story, commnt, event, links) == 1600 alltogether @ large database & special search term (blank or letter not working anymore); this should result in bots not indexing the search results, but i think that with url rewrite, that should not represent a problem
oops
those repeat in:
Text Formatted Code
301 :
while ( ($A = DB_fetchArray($result_stories)) && ($story_results->num_searchresults < 200) ) {
412 :
while ( ($A = DB_fetchArray($result_comments)) && ($comment_results->num_searchresults < 200) ) {
510 :
while ( ($A = DB_fetchArray($result_links)) && ($link_results->num_searchresults < 200) ) {
618 :
while ( ($A = DB_fetchArray($result_events)) && ($event_results->num_searchresults < 200) ) {
so ... would this be a problem to become ... standard geeklog feature with two variables added to config.php
max_search_results ; allready awaiting in config
+ commnt, event, links
+
min_search_chars ; // to insert into searchbox
this two (five?) would be nice ...
couse ... geek seems much faster now
not using all awailable cpu all the time too
7
7
Quote
mach
Anonymous
fyi, pagination on the search page has already been implemented in CVS. works real nice. So you'll see it in 1.3.12
7
6
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Requiring a minimum length for queries may actually break some search options, e.g. "More by (username)" and "More from (topic)" in the story options block.
The actual problem is well-known, fixed in CVS, and the fix will be in 1.3.12.
bye, Dirk
The actual problem is well-known, fixed in CVS, and the fix will be in 1.3.12.
bye, Dirk
6
6
Quote
All times are EST. The time is now 05:11 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content