In article <Pine.LNX.4.21.0105071445001.8519-100000@bigears.ncst.ernet.in>
philip@konark.ncst.ernet.in writes:
It is very hard to achieve it on the standard framework. It should be
done with some CGI wrapper that it converts a query into splitted
I would have done a wrapper in perl, but that would make it slower
so I may have to do it in perl. For now, i think I will just stick
to replacing ,.;:? with space.
Hmm, it should be more easy that you modify src/namazu-cgi.c, like the
following:
--
*** namazu-cgi.c Tue Mar 14 00:32:04 2000
--- namazu-cgi.c.new Mon May 7 19:49:56 2001
***************
*** 179,184 ****
--- 179,186 ----
* Because the default index can be set in namazurc.
*/
init_cgi(query, subquery);
+ replace_query(query);
+ replace_query(subquery);
if (namazu_core(query, subquery) == ERR_FATAL) {
die(nmz_get_dyingmsg());
***************
*** 186,188 ****
--- 188,202 ----
return 0;
}
+ void replace_query(char *query)
+ {
+ char c;
+ char repchars[] = ",.;:?";
+ while (*query != 0) {
+ if (strchr(repchars, *query)) {
+ *query = ' ";
+ }
+ query ++;
+ }
+ }
+
--
(This patch is not tested.)
By the way, there is a perl module named Search::Namazu.
<http://www.namazu.org/~knok/Search-Namazu-0.13.tar.gz>
It is a perl interface for libnmz.
Also, is there any way to change the default matching from AND to OR?
It should be needed modifying source, maybe nmz_expr() function in
nmz/parser.c?
--
NOKUBI Takatsugu
E-mail: knok@daionet.gr.jp
knok@namazu.org / knok@debian.org