version=pmwiki-2.2.0-beta63 ordered=1 urlencoded=1 agent=Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020 Firefox/0.10.1 author=lordmundi charset=ISO-8859-1 csum= host=139.169.145.65 name=PmWiki.SearchImprovements rev=43 targets=Profiles.Lordmundi,Profiles.Renato,Profiles.Henning,PmWiki.SearchForPages,PmWiki.Search,Profiles.Pm,Profiles.Radu,PmWiki.Directives,Profiles.Pico,Category.PmWikiDesign,Category.DocumentationToDo text='''[[~lordmundi]] November 06, 2007, at 10:54 AM:''' Just to add to the discussion below, I thought I would put a link to a sample search result on Renato's site with Sphider integrated:%0a* [[http://www.dicpedia.com.br/dicpedia.php?n=&action=search&q=steve]]%0a%0a'''[[~lordmundi]] November 05, 2007, at 09:05 AM:''' Wow... I really like the [[http://www.sphider.eu|Sphider]] integration you did [[~Renato]]!! It looks great. Looking at the sphider site, this looks like it could be a great cookbook recipe for pmwiki. I'm wondering how you or someone else might do the following:%0a* How do you implement permissions in the search? For example, my search results don't list pages that people aren't authorized to read. This would be even more important since these search results actually show text from the page. I'm guessing each search result would just need to get wrapped in a [@(:if auth read:)@] or something more cuztomizable. Did you do this?%0a** %25purple%25I've edited the config.php file, excluding certain categories (with lines such as $SearchPatterns['default'][] = '!^Site\.!';) as the PmWiki documentation says. Also, Sphider can avoid URLs-including-any-string-you-want and I've used that too.%0a** '''[[~lordmundi]] November 06, 2007, at 10:51 AM:'''That's cool. That lets you ignore certain areas based on location. But what I'm wondering is how you only list pages that the current logged in user has permission to read. For example, let's say PM adds some permission to a special page in the cookbook he doesn't want users looking at. When another user is logged in and searches, how does the page only show up in the search results if they authorized to read it. All that is needed to do it is have a way to insert user code around each result listing. If this feature is there, then we could just have a template that wraps each result from the search with a [@(:if auth read:)@] call. Hopefully this makes some sense.%0a* Looking through the Sphider documenation, I didn't see how the software "re-crawls" the site. Is there supposed to be a cron job or something to make the robot crawl all the pages? Or did you add this in to your pmwiki recipe to search after some sort of timeout, kind of like the notify emails that pmwiki uses?%0a** %25purple%25I guess anyone could easily code a quick bot to re-crawl your site after a few hours/days/weeks (as you wish), but I haven't done that. Not yet, at least, since college has been taking a lot of my time and I'm focused on other coding on my site, right now. So, for now, you have to re-crawl it yourself, which takes about two or three clicks any time you want.%0a%0a** %25purple%25Just to make this clear, I'm a real lame while handling the PmWiki code. I understand close to nothing until now, just the necessary to make it work. I've used the httpvariables recipe so I could get the query string from the URL inserted. As I've stated below (lol), I MAY have done a few more steps, but I can't really remember. I've used the HttpVariables recipe, Sphider and a little javascript (so I can resize the results page (iframe) down when are few results). I'm sure there's someone more skilled than me to do the job, but I'll contribute with anything I can. :)%0a%0aAll in all, it looks really nice. -- [[~lordmundi|FG]] \\%0a%25purple%25Thanks! And I'm sorry I've messed up with your original post, but I guess this was going to be clearer than doing a new "post" above that one. So: my comments are in purple not to mess it ALL up. lol [[~Renato]]%0a%0a'''08/31/07''' - [[~Renato]] - Okay, six months later, I think I've got an idea. I've been playing with [[http://www.sphider.eu|Sphider]] since yesterday. I could implement the search feature in one night (I had some difficulties managing on how to get the results INSIDE the main "window" on PmWiki - most of PmWiki code is Greek to me)... {-I'm having only a small bug with the "Did you Mean" feature (it gets weird when I use capital letters), but other than that (or if you disable it), the search engine is running ok. I'll try to solve that by tonight, but I can't make any promises. And I've messed with a lot of codes, randomly, so I'll have to check it all so to discover what I've done. :P-} (yeah, I should start writing changes history...)%0a%0aOh, anyone can take a look at it on my site, if you don't mind reading Portuguese. :P Good keyphrases are "guitarra elétrica", "symphony x", "steve howe". It will give you the idea. {-If you want to know what the bug is, search for "Stevee".-} I've changed the code so to take everything in lowercase. If that's ok with PmWiki, it will be an option. :)%0a%0a'''[[~Henning]] July 18, 2007, at 12:38 PM:''' It just occurred to me that it would be nice to have a search engine that on request excludes pages older than a certain date from the result (in order to concentrate on recent content). Just brainstorming ...%0a%0a* May also be worth looking at the [[http://lucene.apache.org/|Lucene]] based PHP [[http://wiki.apache.org/jakarta-lucene/LuceneImplementations|implementation]] [[http://framework.zend.com/manual/en/zend.search.html|Zend search]] also [[http://devzone.zend.com/node/view/id/91|Zend Lucene]]%0a%0a'''[[~Henning]] February 22, 2007, at 10:40 AM:'''' I'd be interested in a solution for multiple buttons, too. I`ve seen multiple search buttons used in a non-wiki CMS, and it looks like an efficient user interface device I'd like to copy.%0a%0a'''02/07/07''' - [[~Renato]] - The tips on this thread (PmWikiUsers:2006-October/034807.html) are great for the ones willing to search only for titlenames. %25purple%25Is it possible to have two buttons (Go/Search, as in MediaWiki, for instance)? One for searching titles and the other one for searching content?%0a%0a'''12/14/06''' - [@(:searchresults:)@] can be customized by editing page [@Site.Search@], see also [[PmWiki/Search for pages]].%0a%0a'''6/5/06''' - I totally understand the frustration with PmWiki's%0asearch results...(:if false:), but fmt=#teasers is the wrong answer. For one, it%0ajust does a simple include the first four lines of the target page; while%0athis may be acceptable for many pages, for many others it will%0ado the wrong thing because the first lines tend to contain%0adirectives and headings that will make the output worse.%0a%0a(:if:) But perhaps the issue has come to enough of a head that it's time%0afor me to go ahead and implement a valid way to excerpt (and possibly%0arank) search results, even if it's very suboptimal in a number of%0arespects. Most notably, it will be suboptimal in terms of speed --%0aevery task and option we add to searching/page lists makes it%0arun even slower than it does now. %0a%0aI think I need to remind the group that PmWiki is not a search%0aengine, has never been designed to be a search engine, and I have%0ano intent to make it one. My stance on searching continues to be%0athat if a site wants fast searches with relevance ranking of results%0aand excerpted text outputs, then get a "real" search engine that is%0adesigned for such tasks and let it index the PmWiki site. (Bonus:%0asuch an engine can index and search things that aren't wiki pages,%0asuch as attachments or other static pages on the site.)%0a%0aI should also point out that any author can create a custom search%0apage on pmwiki.org, it doesn't require me to do it. For example, %0ato have a search page that defaults to fmt=#title for its%0aoutput, just create a page that looks something like:%0a%0a(:markup:) [@%0a(:searchbox:)%0a%0a(:searchresults fmt=#title order=title:)%0a@]%0a%0aSee, for example, http://www.pmwiki.org/wiki/Test/SearchByTitle .%0aThen use that custom search page for searching instead of the %0aPmWiki default.%0a%0aStill, I'll see if I can write up an {$Excerpt} page variable%0ain the very near future, as well as an order=rank option.%0a%0aPm%0a----%0aAlso visit [[PmWiki.Search]] for a documented custom search page.%0a----%0a%0a'''2/1/06''' - A lot of people continue to ask for improvements to PmWiki's search capabilities. In the past I've essentially taken the position that "PmWiki is not a search engine", and that using another search engine package (one that is optimized for performing searches) would be much better than me trying to build one of my own.%0a%0aThe pmwiki.org site is starting to become so heavily used that I probably need to set up a search engine there, if only to help keep the server load down. Does anyone have any suggestions for a good, easy-to-install search engine package?%0a%0aThe two I've looked at in detail in the past include:%0a%0aht://Dig -- I've used this several times in the past for other%0a projects, but it doesn't appear to be actively maintained%0a anymore, and integrating it to PmWiki would be slightly kludgey.%0a%0aswish-e -- I did a few experiments with this and concluded that%0a it could be made to work, but curiously it seems to lack any%0a sort of convenient "excerpting" capability. (I could probably%0a live without this.)%0a%0aI also briefly looked at mnoGoSearch, but for some reason I didn't%0athink it was a good fit with what I'm trying to do.%0a%0aAny suggestions?%0a----%0a%0a'''6/13/05''' - PmWiki's search engine scans%0athe markup text directly, not the page's rendered output.%0a%0a*However*, I have been playing with a notion for page caching that%0amight make it possible for PmWiki's search to also scan the rendered%0aversion of the text, so maybe we could go that way... :-)%0a%0a----%0a%0a'''4/15/05''' - I've always maintained that PmWiki *isn't* a search engine, and for%0aadvanced searches a site is much better off integrating an existing%0asearch engine package rather than us trying to reinventing that particular%0awheel.%0a%0aStill, there are times when it may be useful to provide teasers to%0athings that aren't "searches". Most search engines have no clue of %0aPmWiki's structures such as groups, trails, or categories, and so being%0aable to provide teaser information in the context of those structures%0astill makes a lot of sense.%0a%0a----%0a%0a'''6/13/04''' - But your point is well taken. I never really thought of searching for markup sequences. :-)%0a> %0a> I actually do that now and then, so I think we actually have to implement %0a> our own search engine.%0a%0aWell, I wasn't planning to eliminate the search engine, either. I've%0ajust felt that once a basic search capability is available that%0ameets the needs of most PmWiki users, my time and effort is better %0aspent on other aspects of PmWiki and not reinventing search engines%0athat already exist. %0a%0a----%0a(Old content added to this page before Pm ever got a chance to write anything.)%0a%0aAfter Pm made this empty entry, I shamelessly hijacked it to think aloud, maybe spark ideas in others :) I'll presently move these scribbles to PITS entries.%0a%0a*If not included in the core, maybe we could at least have a recipe for excluding the current page from searches (and pagelists, for the matter). I (unsuccessfully) tried adding%0a $SearchPatterns['normal'][] = "!\.$Name$!";%0a-->%25Pm%25 Try:%0a $SearchPatterns['normal'][] = "!^$FullName\$!";%0a%0a*add (different) format arguments that would %0a**add sorting to searchresults and pagelist (by file date or even other values definable in local/config; something like the fields in PITS, Field: value, one field per line, anywhere in the file)%0a---> %25Pm%25 Already on the design books -- just haven't implemented it yet. --[[~Pm]]%0a**supress the 'search report' at the top, e.g. 'Results of search for group=`GName fmt=simple list=normal :'%0a---> %25Pm%25 Use [@(:pagelist:)@] instead of [@(:searchresults:)@] for this.%0a**supress the 'search result' at the bottom, e.g. '3 pages found out of 27 pages searched'%0a---> %25Pm%25 Use [@(:pagelist:)@] instead of [@(:searchresults:)@] for this.%0a%0a-[[~Radu]] March 11, 2005, at 01:43 PM%0a%0a----%0a[[~Radu]] March 14, 2005, at 11:25 PM\\%0aBut [@(:pagelist:)@] does not allow `SearchString ... or does it? It's definitely not documented under [[Directives]]%0a%0a[[~Pico]] March 27, 2006, at 03:51 PM \\%0aApparently it does. Take a look at [[Cookbook:PagelistExplained]] for more about pagelist (and searchresults). As for [[Directives]], that needs work and is catagorized for Documentation To Do.%0a%0aCategory: [[!PmWiki Design]] [[!DocumentationToDo]] time=1194368084