You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by russell johnson <bv...@gmail.com> on 2005/09/06 03:08:36 UTC

mod_mbox search code

Hello every one

This is the first code release of the mod_mbox search SoC project. I used 
the mysql full test search feature as the backbone of this search feature 
for mod_mbox. To make an connection pool with mysql I used a combination of 
libdbi and mod_dbipool. Libdbi also provided functions to help protect from 
SQL injection attacks. 

The UI for the search is non-existent right now I will be working with 
Maxime Petazzoni soon to integrate my search into his new mod_mbox UI. Right 
now there is an apache handler in my code if you want to test the search. It 
is not meant to be use in any other capacity and so is very inefficient and 
causes some problem with the rest of mod_mbox functions. There are a few 
variables in mod_mbox_sreach.c to change for the search input and the output 
goes straight to error_log. 
 
The field variable can be "subject", "body", "subject,body" depending on 
what part/parts of the message you want to search. 

The type variable can be "bool" or "notbool" depending on if you want a 
natural language search or a Boolean search. 
This article http://mysqld.active-venture.com/Fulltext_Search.html or the 
mysql manual explains the search types and syntax well. 

The search_terms variable is where your search query goes as one big string. 
"I'm looking for this". 

To make the table just set up an mysql database of any name and use the perl 
scripts in /home/russ/ in this tar file. 

To make a new table and add all the .mbox files in a directory.
./make_fts_db <mysql database name> <mysql user> <mysql password> <path to 
.mbox files>

To add a .mbox file to the table.
./update_fts_db <mysql database name> <mysql user> <mysql password> <path to 
a .mbox file>

A tarball of this code can be found here:
http://www.clanbv.org/public/mod_mbox/ 
I am very open to critiques and comments so please let me know what you 
think

Russell

Re: mod_mbox search code

Posted by Maxime Petazzoni <ma...@bulix.org>.
Hi Russell,

> A tarball of this code can be found here:
> http://www.clanbv.org/public/mod_mbox/
> I am very open to critiques and comments so please let me know what
> you think

I'll start looking at your code very soon so I can think about how to
integrate your search feature into the new mod_mbox UI. I'll standing
aside for a while, listening to reviews and comments on your code.

I'm still waiting for mine to get reviewed and voted, but it does not
avoid me to look to what you've done.

Regards,
- Sam

-- 
Maxime Petazzoni (http://www.bulix.org)
 -- gone crazy, back soon. leave message.