Boolean Searching modification
Hello,
We have an internal staff intranet at our library that is built upon tikiwiki, and thanks to the community, it has grown by leaps and bounds and now has over a 1000 wiki pages, hundreds of blog posts, forum discussions, etc.
One of the things that became quickly apparent to us is that the built in search features of tikiwiki were not robust enough for us....I dont think this is a big problem for most, as they can just integrate some type of google search module into their site. But if your site is behind a firewall, and therefore cannot be indexed by google, that option is not available.
We had a university student by the name of Will Hutchison who took a look at this problem for us and gave us a quick solution. It is working for us, and now we have phrase searching (with qoutes) as well as + and - operators. The replacement file is attached to this forum post.....
Be careful with this code, I mainly post it here to try and give a little back to the community. My concern here is that the code change might open yourself to sql injection, not a concern for us. My understanding is that there were only two line changes to the sql statements which changed the way it encoded the html search phrase. I am hoping someone with more time can improve this code and include it in future releases.
For example, if you did a normal search for narrative nonfiction on our tikiwiki before the code enhancement, you would receive 34 hits.
After the code enhancement, if you do a phrase search "narrative nonfiction" (make sure you use the qoutes), you come up with 3 results.
If you do "narrative nonfiction" -subjects (which states show me all content that has the phrase narrative nonfiction but does NOT have the word subject), you will see two results, the page with the word subject dropping off.