Register to post in forums, or Log in to your existing account
 

Post new topic  Reply to topic     Home » Forums » Website or Forum problems
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 15, 2005 3:50 am   

New search pages
 
Since I couldn't get anyone to help me track down the bugs in zMUD today, I spent the day working on the website scripts for the Search function.

You'll notice several improvements:
  • When you move the mouse over the Site/Search menu, you'll see two new sub-menus: Search Forums and Search Knowledge Base.
  • If you just enter a value into the search box at the top of the page, it will search *BOTH* the Forums and Knowledge Base (showing each in a separate frame).
  • Both the Forum search and Knowledge Base search now use a MySQL Fulltext index. This makes searching a lot faster. By default, results are returned in relevance order, with the topic with the most "hits" listed first. Also, a higher weight is given to topics that contain your search phrase in the title vs the body of the article or post.
  • The old search code did manual parsing of AND, OR, and NOT keywords. This was very buggy. The new search code doesn't use these keywords at all. It passes your query string to the MySQL MATCH (IN BOOLEAN) function. You can put a + before a word to include it, a - before a word to exclude it, and various other special characters.
  • I tweaked the parser so that words beginning with # or % are automatically quoted so that they match the # and % character properly. This makes it easier to search for zMUD commands and functions.
  • When using the direct Forum or Knowledge Base searching, I tweaked it so that you can use the Browser Back button to return to the search list. This doesn't work when Both are searched using the simple search box at the top of the screen because of the IFRAME tags that are being used. In other words, when you press Back, the browser doesn't know how to refresh the IFRAMEs, so you get an error. I haven't found any way to avoid this. The way it normally works, your search results are cached in a database table. There is no way to cache two separate searches (one on the forums and one on the knowledge base).
  • When looking at the results of the "Both" search, the title bars are hyperlinks for going to the full list of Forum or Knowledge base searches. You can click on these links and then you'll get a full list of matches within either the Forums or Knowledge Base, and now from this page, after you select a topic to view, the Back button will properly return you to this page.

That's all probably a bit confusing, but give it a try. It mostly works how you expect it to. So far it looks like it's working a lot better than the old search function, but let me know what you think and if you find any problems with it.

I must say that the existing search page in PHPBB was a real mess. The way searching is implemented in PHPBB with the internal database cache, it's basically impossible to search multiple locations and put the results on a single page. The IFRAME kludge was the only thing I could come up with. It's not the best solution, but I think it's better than nothing.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 15, 2005 4:04 am   
 
Oh yeah, and if anyone knows how to set the color of an IFRAME background when the target page is smaller than the specified size, let me know. You'll notice if you search for something that doesn't exist (like xyzzy) the background of the IFRAME is the wrong color. And I don't know where it's getting this from.

Or, if you know how to make an IFRAME automatically fit the size of the resulting page (so it doesn't need the scrollbars), or a better way to do any of this, let me know. I haven't used IFRAMEs before and they seem to be pretty limiting.

Basically, I need to call the two separate search scripts and put both results onto the same page in some easy manner.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Jun 28, 2005 7:39 pm   
 
maybe it's just me, but
1) doing a search in the box at the top right of the screen does an auto search in the forum and the knowledge base, and puts them in 2 small windows in the browser. Ignore this part. didnt read that it said that in the original post. The rest is still valid (i hope)
2) the forum part of that starts from oldest to newest
3) if a post is clicked in the forum part it don't open into a new screen or refreshed screen, but in the ity-bity screen that shows the forum window there.
3A. i'd check to see if the same happens in the knowledge base part, but for some reason i have YET to have anything show up there. http://forums.zuggsoft.com/phpbb/viewtopic.php?t=21476 is about CopyFile. did the search, and nothing comes up.
4) In the normal search screen (Site > Search > Search Forums) regardless of if you select Ascending or Descending, the posts will always display from oldest to newest.
5) Shouldn't the KB be in some drop down in the menu above? Couldn't locate it easily.
_________________
http://www.Aardwolf.com
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 29, 2005 12:23 am   
 
2) Actually, the date has nothing to do with it. It is in "relevance" order based on the MySQL full-text search. It's possible that in case of a tie that items get listed in reverse order, so I'll look into that to add an additional ORDER BY clause to the search.

3) Yep, reproduced. Wierd, it didn't do this when I was first working on the page, so it's something that happened during the final tweaking of the search page for some reason. I'll see if I can fix it.

3A) I just typed "CopyFile" into the search box and in the KB section it listed CopyFile as the first topic and I was able to click on it and see the article (within the frame as you mentioned in 3). So I'm not sure why your search isn't showing anything.

4) That's wierd, since that still points to the original PHPBB search scripts, which I haven't modified. They are up-to-date, so maybe this is just a bug that nobody has reported to the PHPBB people. But I'll take a look at it.

5) Yes it is. Under the Support menu, select Documentation. "Documentation" is a better description, but Knowledge Base is left over from the original MX-Portal MOD and I haven't gone through and eliminated all of the references (which would be a lot of work actually). Eventually the articles in the "zMUD Support" section of the Support page will also be integrated into the Knowledge Base also.

Anyway, hopefully these are fairly minor issues since I won't be able to fix this for at least a week or so. I'm surprised it took someone this long to post about it, actually, so thanks very much for bringing this stuff to my attention.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Wed Jun 29, 2005 12:42 am   
 
2) kewl. Used to always show from newest to oldest before.
3) kewl.
3A) dunno. typed CopyFile again just now, and the only thing it shows is in the forums under this posting.
4) it USED to sort based on what yo wanted. Used to always show from newest to oldest as default.
5) Ah, now ya see, wouldn't have thought to click Documentation for the Knowledge Base. Since it's just a drop down menu, how does "all of the references" factor into that? No clue how this board code works, so sorry if i'm confused there.

Not a problem at all. Actually, noticed this a while ago...a few days before my name change. but never got around to mentioning it.
_________________
http://www.Aardwolf.com
Reply with quote
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: Wed Jun 29, 2005 10:26 pm   
 
I too got nothing in the KB window. I started playing with some of the # and % keywords and got nothing. After reading further I tried the CopyFile and got nothing in the KB part, but did get this Whole Post in the Forum part.
_________________
Stay JOLLY!
H

___
Humpton lives like he types.... fast, and full of mistakes!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jul 12, 2005 8:11 pm   
 
OK, I was able to work on the Search page again. Here is what I fixed:

(2) Order is now by relevance score, but for posts with the same score, they are now sorted newest to oldest. Articles in the KB with the same score are sorted alphabetically by title. Note that when searching the forums, each individual reply (post) is searched and scored, and then a list of the parent topic is created. Thus, the post order doesn't necessarily reflect the same as the topic order. Also, there is no way to combine all of the posts within a topic and search the result. So, a topic with lots and lots of replies doesn't get a higher score. Unfortunately there just isn't a way to search the combined text of all replies within a certain topic.

So, the new search order is better than before, but still not perfect.

(3) Clicking on search results no longer loads them within the small frame.

(4) haven't fixed this yet

(Humpton 1) There was an access problem for normal users. I fixed this so searching should now display knowledge base articles properly. I tested this with a normal forum user account and tried CopyFile and now it works correctly.

I think these changes make the Search function useful once again. Let me know if there are any remaining problems.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Wed Jul 13, 2005 12:49 pm   
 
2) Kewl. Rather by date, but this is okay. How does it assign a score tho? if # of replies don't give a higher score meaning more input was put into the answer? - Never mind think i understand now. got a headache and aint thinking clear...not that i EVER do...

3) BLESS YOU!!

4) ok
_________________
http://www.Aardwolf.com
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jul 13, 2005 4:46 pm   
 
2) The score comes from the number of times your search word occurs in the post. It only looks at the body of each individual post.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Wed Jul 13, 2005 6:58 pm   
 
*nodnod*
figured that after.
_________________
http://www.Aardwolf.com
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jul 20, 2005 12:18 am   
 
After some tricky programming, I was able to fix the site-search function and remove the embedded IFRAMEs. So, if you type a word into the main search box at the top-right of the page, it will display the search results for both the forums and knowledge base without any scrolling frames. Give it a try and let me know if you find any problems.
Reply with quote
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: Wed Jul 20, 2005 12:29 am   
 
Wonderful, it now looks and works as expected. It also seems to be giving better results?
_________________
Stay JOLLY!
H

___
Humpton lives like he types.... fast, and full of mistakes!
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Wed Jul 20, 2005 1:32 am   
 
Looks MUCH better.
_________________
http://www.Aardwolf.com
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Wed Aug 10, 2005 2:58 pm   Search has gone wonkers
 
Search has gone wonkers

Fatal error: Maximum execution time of 30 seconds exceeded in /www/htdocs_emobius/phpbb/search_kb.php on line 526
_________________
http://www.Aardwolf.com
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Aug 10, 2005 3:14 pm   
 
Seems to work fine right now. What exact search term did you use? And did you enter it into the box in the upper-right corner, or somewhere else?
Reply with quote
Lygaios
Newbie


Joined: 12 Oct 2000
Posts: 9
Location: USA

PostPosted: Wed Aug 10, 2005 4:21 pm   
 
Not sure if this is a problem or an inherent limitation of SQL, but the search function seems to really dislike anything with an apostrophe in it; i.e., entering "Dragon's Gate" (in either the search box or drop-down) returns "SQL Error : 1064 You have an error in your SQL syntax. Check the manual ..."

-Lygaios
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Aug 11, 2005 2:13 am   
 
OK, I fixed the problem with quotes like with "Dragon's Gate".

I also fixed the problem with the search hanging and timing out. This was caused by too many results being returned. So I have now limited the search function to return a maximum of 100 items.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Website or Forum problems All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net