Restore namazu template files.
authorIan Kelling <iank@fsf.org>
Wed, 22 May 2019 02:34:24 +0000 (22:34 -0400)
committerIan Kelling <iank@fsf.org>
Wed, 22 May 2019 16:36:53 +0000 (12:36 -0400)
Andrew removed this as part of upgrading namazu and likely to deal with
the issue that javascript was required to do subsequent searches. But
this made subsequent searches broken in a more obvious way with or
without javascript, and also made it so you couldn't sort the results. I
think I can fix the javascript issue.

20 files changed:
.gitignore
cgi-bin/template [deleted symlink]
cgi-bin/template/NMZ.body [new file with mode: 0644]
cgi-bin/template/NMZ.body.in [new file with mode: 0644]
cgi-bin/template/NMZ.body.in.dist [new file with mode: 0644]
cgi-bin/template/NMZ.foot [new file with mode: 0644]
cgi-bin/template/NMZ.foot.in [new file with mode: 0644]
cgi-bin/template/NMZ.foot.in.dist [new file with mode: 0644]
cgi-bin/template/NMZ.head [new file with mode: 0644]
cgi-bin/template/NMZ.head.in [new file with mode: 0644]
cgi-bin/template/NMZ.head.in.dist [new file with mode: 0644]
cgi-bin/template/NMZ.result.normal [new file with mode: 0644]
cgi-bin/template/NMZ.result.normal.in [new file with mode: 0644]
cgi-bin/template/NMZ.result.normal.in.dist [new file with mode: 0644]
cgi-bin/template/NMZ.result.short [new file with mode: 0644]
cgi-bin/template/NMZ.result.short.in [new file with mode: 0644]
cgi-bin/template/NMZ.result.short.in.dist [new file with mode: 0644]
cgi-bin/template/NMZ.tips [new file with mode: 0644]
cgi-bin/template/NMZ.tips.in [new file with mode: 0644]
cgi-bin/template/NMZ.tips.in.dist [new file with mode: 0644]

index 9a4930c661b64d4b570f67523d02818e985dffe8..d9f6227f82f9ca3c328ee656b69b47012692bfdb 100644 (file)
@@ -6,7 +6,6 @@
 /.bash*
 /.gitconfig
 /log
-/namazu
 
 # This is debug log file when "The \x22negative number\x22 problem occurred.\n" happens.
 # todo: we don't rotate this afaik, we should
diff --git a/cgi-bin/template b/cgi-bin/template
deleted file mode 120000 (symlink)
index 024a99c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/namazu/template/
\ No newline at end of file
diff --git a/cgi-bin/template/NMZ.body b/cgi-bin/template/NMZ.body
new file mode 100644 (file)
index 0000000..d9eef22
--- /dev/null
@@ -0,0 +1,190 @@
+<h2><a name="query">Query</a></h2>
+
+<h3><a name="query-ignored">Long messages and words are ignored</a></h3>
+<p>
+Messages longer than 100,000 letters or 500,000 bytes are ignored. Words
+longer than 40 characters are ignored. Attachments are ignored.
+</p>
+
+<h3><a name="query-term">Single term query</a></h3>
+<p>
+The query specifies only one term for retrieving all
+documents which contain the term. e.g., 
+</p>
+
+<p class="example">
+namazu
+</p>
+
+<h3><a name="query-and">AND query</a></h3> 
+
+<p>
+The query specifies two or more terms for retrieving all
+documents which contain both terms. You can insert the
+<code class="operator">and</code> operator between the terms. e.g., 
+</p>
+
+<p class="example">
+Linux and Netscape
+</p>
+
+<p>
+You can ommit the <code class="operator">and</code> operator.  Terms which is
+separated by one ore more spaces is assumed to be AND query.
+</p>
+
+<h3><a name="query-or">OR query</a></h3>
+<p>
+The query specifies two or more terms for retrieving all
+documents which contain either term. You can insert the
+<code class="operator">or</code> operator between the terms.
+e.g.,
+</p>
+
+<p class="example">
+Linux or FreeBSD
+</p>
+
+<h3><a name="query-not">NOT query</a></h3>
+<p>
+The query specifies two or more terms for retrieving all
+documents which contain a first term but does't contain the
+following terms. You can insert the <code class="operator">not</code>
+operator between the terms to do NOT query.  e.g.,
+</p>
+
+<p class="example">
+Linux not UNIX
+</p>
+
+
+<h3><a name="query-grouping">Grouping</a></h3>
+<p>
+You can group queries by surrounding them by
+parentheses. The parentheses should be separated by one or
+more spaces. e.g., 
+</p>
+
+<p class="example">
+( Linux or FreeBSD ) and Netscape not Windows
+</p>
+
+<h3><a name="query-phrase">Phrase searching</a></h3>
+<p>
+You can search for a phrase which consists of two or more terms
+by surrounding them with double quotes like
+<code class="operator">"..."</code> or with braces like <code class="operator">{...}</code>.
+In Namazu, precision of phrase searching is not 100 %,
+so it causes wrong results occasionally. e.g.,
+</p>
+
+<p class="example">
+{GNU Emacs}
+</p>
+
+<!-- foo
+<p>
+You must choose the latter with Tkanamzu or namazu.el.
+</p>
+-->
+
+<h3><a name="query-substring">Substring matching</a></h3>
+<p>
+The are three types of substring matching searching.
+</p>
+
+<dl> 
+<dt>Prefix matching
+<dd><code class="example">inter*</code> (terms which begin with <code>inter</code>)
+<dt>Inside matching
+<dd><code class="example">*text*</code> (terms which contain <code>text</code>) 
+<dt>Suffix matching
+<dd><code class="example">*net</code> (terms which terminated
+with <code>net</code>)
+</dl>
+
+
+<h3><a name="query-regex">Regular expressions</a></h3>
+
+<p>
+You can use regular expressions for pattern matching. The
+regular expressions must be surrounded by slashes like <code
+class="operator">/.../</code>. Namazu uses <a
+href="http://www.ruby-lang.org/">Ruby</a>'s regular
+regular expressions engine. It offers generally <a
+href="http://www.perl.com/">Perl</a> compatible flavor.
+e.g.,
+</p>
+
+<p class="example">
+/pro(gram|blem)s?/
+</p>
+
+
+<h3><a name="query-field">Field-specified searching</a></h3>
+<p>
+You can limit your search to specific fields such as
+<code>Subject:</code>, <code>From:</code>,
+<code>Message-Id:</code>. It's especially convenient for
+Mail/News documents. e.g.,
+</p>
+
+<ul>
+<li><code class="example">+subject:Linux</code><br>
+(Retrieving all documents which contain <code>Linux</code>
+in a <code>Subject:</code> field)
+
+<li><code class="example">+subject:"GNU Emacs"</code><br>
+(Retrieving all documents which contain <code>GNU Emacs</code>
+in a <code>Subject:</code> field)
+
+<li><code class="example">+from:foo@bar.jp</code><br>
+(Retrieving all documents which contain <code>foo@bar.jp</code>
+in a <code>From:</code> field)
+
+
+<li><code class="example">+message-id:&lt;199801240555.OAA18737@foo.bar.jp&gt;</code><br>
+(Retrieving a certain document which contains specified
+<code>Message-Id:</code>)
+</ul>
+
+<h3><a name="query-notes">Notes</a></h3>
+
+<ul>
+<li>In any queries, Namazu ignores case distinctions of
+alphabet characters. In other words, Namazu does
+case-insensitive pattern matching in any time.
+
+
+<li>Japanese phrases are forced to be segmented into
+morphemes automatically and are handled them as <a
+href="#query-phrase">phrase searching</a>. This processing
+causes invalid segmentation occasionally.
+
+
+<li>Alphabet, numbers or a part of symbols (duplicated in
+ASCII) characters which defined in JIS X 0208 (Japanese
+Industrial Standards) are handled as ASCII characters.
+
+<li>Namazu can handle a term which contains symbols like
+<code>TCP/IP</code>.  Since this handling isn't complete,
+you can describe <code>TCP and IP</code> instead of
+<code>TCP/IP</code>, but it may cause noisy results.
+
+
+<li>Substring matching and field-specified searching takes
+more time than other methods.
+
+<li>If you want to use <code class="operator">and</code>,
+<code class="operator">or</code> or <code
+class="operator">not</code> simply as terms, you can
+surround them respectively with double quotes like <code
+class="operator">"..."</code> or braces like <code
+class="operator">{...}</code>. 
+
+<!-- foo
+You must choose the latter with Tkanamzu or namazu.el.
+-->
+
+</ul>
+
diff --git a/cgi-bin/template/NMZ.body.in b/cgi-bin/template/NMZ.body.in
new file mode 100644 (file)
index 0000000..d9eef22
--- /dev/null
@@ -0,0 +1,190 @@
+<h2><a name="query">Query</a></h2>
+
+<h3><a name="query-ignored">Long messages and words are ignored</a></h3>
+<p>
+Messages longer than 100,000 letters or 500,000 bytes are ignored. Words
+longer than 40 characters are ignored. Attachments are ignored.
+</p>
+
+<h3><a name="query-term">Single term query</a></h3>
+<p>
+The query specifies only one term for retrieving all
+documents which contain the term. e.g., 
+</p>
+
+<p class="example">
+namazu
+</p>
+
+<h3><a name="query-and">AND query</a></h3> 
+
+<p>
+The query specifies two or more terms for retrieving all
+documents which contain both terms. You can insert the
+<code class="operator">and</code> operator between the terms. e.g., 
+</p>
+
+<p class="example">
+Linux and Netscape
+</p>
+
+<p>
+You can ommit the <code class="operator">and</code> operator.  Terms which is
+separated by one ore more spaces is assumed to be AND query.
+</p>
+
+<h3><a name="query-or">OR query</a></h3>
+<p>
+The query specifies two or more terms for retrieving all
+documents which contain either term. You can insert the
+<code class="operator">or</code> operator between the terms.
+e.g.,
+</p>
+
+<p class="example">
+Linux or FreeBSD
+</p>
+
+<h3><a name="query-not">NOT query</a></h3>
+<p>
+The query specifies two or more terms for retrieving all
+documents which contain a first term but does't contain the
+following terms. You can insert the <code class="operator">not</code>
+operator between the terms to do NOT query.  e.g.,
+</p>
+
+<p class="example">
+Linux not UNIX
+</p>
+
+
+<h3><a name="query-grouping">Grouping</a></h3>
+<p>
+You can group queries by surrounding them by
+parentheses. The parentheses should be separated by one or
+more spaces. e.g., 
+</p>
+
+<p class="example">
+( Linux or FreeBSD ) and Netscape not Windows
+</p>
+
+<h3><a name="query-phrase">Phrase searching</a></h3>
+<p>
+You can search for a phrase which consists of two or more terms
+by surrounding them with double quotes like
+<code class="operator">"..."</code> or with braces like <code class="operator">{...}</code>.
+In Namazu, precision of phrase searching is not 100 %,
+so it causes wrong results occasionally. e.g.,
+</p>
+
+<p class="example">
+{GNU Emacs}
+</p>
+
+<!-- foo
+<p>
+You must choose the latter with Tkanamzu or namazu.el.
+</p>
+-->
+
+<h3><a name="query-substring">Substring matching</a></h3>
+<p>
+The are three types of substring matching searching.
+</p>
+
+<dl> 
+<dt>Prefix matching
+<dd><code class="example">inter*</code> (terms which begin with <code>inter</code>)
+<dt>Inside matching
+<dd><code class="example">*text*</code> (terms which contain <code>text</code>) 
+<dt>Suffix matching
+<dd><code class="example">*net</code> (terms which terminated
+with <code>net</code>)
+</dl>
+
+
+<h3><a name="query-regex">Regular expressions</a></h3>
+
+<p>
+You can use regular expressions for pattern matching. The
+regular expressions must be surrounded by slashes like <code
+class="operator">/.../</code>. Namazu uses <a
+href="http://www.ruby-lang.org/">Ruby</a>'s regular
+regular expressions engine. It offers generally <a
+href="http://www.perl.com/">Perl</a> compatible flavor.
+e.g.,
+</p>
+
+<p class="example">
+/pro(gram|blem)s?/
+</p>
+
+
+<h3><a name="query-field">Field-specified searching</a></h3>
+<p>
+You can limit your search to specific fields such as
+<code>Subject:</code>, <code>From:</code>,
+<code>Message-Id:</code>. It's especially convenient for
+Mail/News documents. e.g.,
+</p>
+
+<ul>
+<li><code class="example">+subject:Linux</code><br>
+(Retrieving all documents which contain <code>Linux</code>
+in a <code>Subject:</code> field)
+
+<li><code class="example">+subject:"GNU Emacs"</code><br>
+(Retrieving all documents which contain <code>GNU Emacs</code>
+in a <code>Subject:</code> field)
+
+<li><code class="example">+from:foo@bar.jp</code><br>
+(Retrieving all documents which contain <code>foo@bar.jp</code>
+in a <code>From:</code> field)
+
+
+<li><code class="example">+message-id:&lt;199801240555.OAA18737@foo.bar.jp&gt;</code><br>
+(Retrieving a certain document which contains specified
+<code>Message-Id:</code>)
+</ul>
+
+<h3><a name="query-notes">Notes</a></h3>
+
+<ul>
+<li>In any queries, Namazu ignores case distinctions of
+alphabet characters. In other words, Namazu does
+case-insensitive pattern matching in any time.
+
+
+<li>Japanese phrases are forced to be segmented into
+morphemes automatically and are handled them as <a
+href="#query-phrase">phrase searching</a>. This processing
+causes invalid segmentation occasionally.
+
+
+<li>Alphabet, numbers or a part of symbols (duplicated in
+ASCII) characters which defined in JIS X 0208 (Japanese
+Industrial Standards) are handled as ASCII characters.
+
+<li>Namazu can handle a term which contains symbols like
+<code>TCP/IP</code>.  Since this handling isn't complete,
+you can describe <code>TCP and IP</code> instead of
+<code>TCP/IP</code>, but it may cause noisy results.
+
+
+<li>Substring matching and field-specified searching takes
+more time than other methods.
+
+<li>If you want to use <code class="operator">and</code>,
+<code class="operator">or</code> or <code
+class="operator">not</code> simply as terms, you can
+surround them respectively with double quotes like <code
+class="operator">"..."</code> or braces like <code
+class="operator">{...}</code>. 
+
+<!-- foo
+You must choose the latter with Tkanamzu or namazu.el.
+-->
+
+</ul>
+
diff --git a/cgi-bin/template/NMZ.body.in.dist b/cgi-bin/template/NMZ.body.in.dist
new file mode 100644 (file)
index 0000000..f7706f1
--- /dev/null
@@ -0,0 +1,184 @@
+<h2><a name="query">Query</a></h2>
+
+<h3><a name="query-term">Single term query</a></h3>
+<p>
+The query specifies only one term for retrieving all
+documents which contain the term. e.g., 
+</p>
+
+<p class="example">
+namazu
+</p>
+
+<h3><a name="query-and">AND query</a></h3> 
+
+<p>
+The query specifies two or more terms for retrieving all
+documents which contain both terms. You can insert the
+<code class="operator">and</code> operator between the terms. e.g., 
+</p>
+
+<p class="example">
+Linux and Netscape
+</p>
+
+<p>
+You can ommit the <code class="operator">and</code> operator.  Terms which is
+separated by one ore more spaces is assumed to be AND query.
+</p>
+
+<h3><a name="query-or">OR query</a></h3>
+<p>
+The query specifies two or more terms for retrieving all
+documents which contain either term. You can insert the
+<code class="operator">or</code> operator between the terms.
+e.g.,
+</p>
+
+<p class="example">
+Linux or FreeBSD
+</p>
+
+<h3><a name="query-not">NOT query</a></h3>
+<p>
+The query specifies two or more terms for retrieving all
+documents which contain a first term but does't contain the
+following terms. You can insert the <code class="operator">not</code>
+operator between the terms to do NOT query.  e.g.,
+</p>
+
+<p class="example">
+Linux not UNIX
+</p>
+
+
+<h3><a name="query-grouping">Grouping</a></h3>
+<p>
+You can group queries by surrounding them by
+parentheses. The parentheses should be separated by one or
+more spaces. e.g., 
+</p>
+
+<p class="example">
+( Linux or FreeBSD ) and Netscape not Windows
+</p>
+
+<h3><a name="query-phrase">Phrase searching</a></h3>
+<p>
+You can search for a phrase which consists of two or more terms
+by surrounding them with double quotes like
+<code class="operator">"..."</code> or with braces like <code class="operator">{...}</code>.
+In Namazu, precision of phrase searching is not 100 %,
+so it causes wrong results occasionally. e.g.,
+</p>
+
+<p class="example">
+{GNU Emacs}
+</p>
+
+<!-- foo
+<p>
+You must choose the latter with Tkanamzu or namazu.el.
+</p>
+-->
+
+<h3><a name="query-substring">Substring matching</a></h3>
+<p>
+The are three types of substring matching searching.
+</p>
+
+<dl> 
+<dt>Prefix matching
+<dd><code class="example">inter*</code> (terms which begin with <code>inter</code>)
+<dt>Inside matching
+<dd><code class="example">*text*</code> (terms which contain <code>text</code>) 
+<dt>Suffix matching
+<dd><code class="example">*net</code> (terms which terminated
+with <code>net</code>)
+</dl>
+
+
+<h3><a name="query-regex">Regular expressions</a></h3>
+
+<p>
+You can use regular expressions for pattern matching. The
+regular expressions must be surrounded by slashes like <code
+class="operator">/.../</code>. Namazu uses <a
+href="http://www.ruby-lang.org/">Ruby</a>'s regular
+regular expressions engine. It offers generally <a
+href="http://www.perl.com/">Perl</a> compatible flavor.
+e.g.,
+</p>
+
+<p class="example">
+/pro(gram|blem)s?/
+</p>
+
+
+<h3><a name="query-field">Field-specified searching</a></h3>
+<p>
+You can limit your search to specific fields such as
+<code>Subject:</code>, <code>From:</code>,
+<code>Message-Id:</code>. It's especially convenient for
+Mail/News documents. e.g.,
+</p>
+
+<ul>
+<li><code class="example">+subject:Linux</code><br>
+(Retrieving all documents which contain <code>Linux</code>
+in a <code>Subject:</code> field)
+
+<li><code class="example">+subject:"GNU Emacs"</code><br>
+(Retrieving all documents which contain <code>GNU Emacs</code>
+in a <code>Subject:</code> field)
+
+<li><code class="example">+from:foo@bar.jp</code><br>
+(Retrieving all documents which contain <code>foo@bar.jp</code>
+in a <code>From:</code> field)
+
+
+<li><code class="example">+message-id:&lt;199801240555.OAA18737@foo.bar.jp&gt;</code><br>
+(Retrieving a certain document which contains specified
+<code>Message-Id:</code>)
+</ul>
+
+<h3><a name="query-notes">Notes</a></h3>
+
+<ul>
+<li>In any queries, Namazu ignores case distinctions of
+alphabet characters. In other words, Namazu does
+case-insensitive pattern matching in any time.
+
+
+<li>Japanese phrases are forced to be segmented into
+morphemes automatically and are handled them as <a
+href="#query-phrase">phrase searching</a>. This processing
+causes invalid segmentation occasionally.
+
+
+<li>Alphabet, numbers or a part of symbols (duplicated in
+ASCII) characters which defined in JIS X 0208 (Japanese
+Industrial Standards) are handled as ASCII characters.
+
+<li>Namazu can handle a term which contains symbols like
+<code>TCP/IP</code>.  Since this handling isn't complete,
+you can describe <code>TCP and IP</code> instead of
+<code>TCP/IP</code>, but it may cause noisy results.
+
+
+<li>Substring matching and field-specified searching takes
+more time than other methods.
+
+<li>If you want to use <code class="operator">and</code>,
+<code class="operator">or</code> or <code
+class="operator">not</code> simply as terms, you can
+surround them respectively with double quotes like <code
+class="operator">"..."</code> or braces like <code
+class="operator">{...}</code>. 
+
+<!-- foo
+You must choose the latter with Tkanamzu or namazu.el.
+-->
+
+</ul>
+
diff --git a/cgi-bin/template/NMZ.foot b/cgi-bin/template/NMZ.foot
new file mode 100644 (file)
index 0000000..6e5abdb
--- /dev/null
@@ -0,0 +1,7 @@
+<hr>
+<address>
+This search system is powered by 
+<strong><a href="http://www.namazu.org/">Namazu</a></strong>
+</address>
+</body>
+</html>
diff --git a/cgi-bin/template/NMZ.foot.in b/cgi-bin/template/NMZ.foot.in
new file mode 100644 (file)
index 0000000..6e5abdb
--- /dev/null
@@ -0,0 +1,7 @@
+<hr>
+<address>
+This search system is powered by 
+<strong><a href="http://www.namazu.org/">Namazu</a></strong>
+</address>
+</body>
+</html>
diff --git a/cgi-bin/template/NMZ.foot.in.dist b/cgi-bin/template/NMZ.foot.in.dist
new file mode 100644 (file)
index 0000000..6e5abdb
--- /dev/null
@@ -0,0 +1,7 @@
+<hr>
+<address>
+This search system is powered by 
+<strong><a href="http://www.namazu.org/">Namazu</a></strong>
+</address>
+</body>
+</html>
diff --git a/cgi-bin/template/NMZ.head b/cgi-bin/template/NMZ.head
new file mode 100644 (file)
index 0000000..e9f2743
--- /dev/null
@@ -0,0 +1,81 @@
+<html>
+<head>
+<title>Mail Archive Search</title>
+<style type="text/css"><!--
+  strong.keyword { color: Red; }
+  p.example      { text-indent: 1em; 
+                   color: Navy;
+                  font-weight: bold;
+                   font-family: monospace; }
+  code           { color: Navy;
+                   font-family: monospace; }
+  code.example   { color: Navy;
+                  font-weight: bold;
+                   font-family: monospace; }
+  code.operator  { color: Navy;
+                   font-family: monospace; 
+                  font-weight: bold; }
+--></style>
+<script>
+function getArgs() {
+  var args = new Object();
+  if (location.search.length <= 1) return args;
+  var pairs = location.search.substring(1).split("&");
+  for (var i=0; i < pairs.length; ++i) {
+    var pos = pairs[i].indexOf('=');
+    if (pos < 0) {
+      args[pairs[i]] = "";
+      continue;
+    }
+    args[pairs[i].substring(0,pos)] = unescape(pairs[i].substring(pos+1));
+  }
+  return args;
+}
+var queryArgs = getArgs();
+var idxname = queryArgs["idxname"];
+</script>
+</head>
+<body lang="en">
+<script>
+document.writeln("<h1><a href=\"/archive/html/" + idxname +"/\">" +
+                idxname + " archive</a> search</h1>");
+</script>
+<form method="get" action="{cgi}">
+<p><strong>Search String:</strong> 
+<input type="text" name="query" size="40">
+<input type="submit" name="submit" value="Search!">
+<script>
+document.writeln("<input type=\"hidden\" name=\"idxname\" value=\"" + 
+                idxname + "\">");
+document.writeln("<a href=\"{cgi}?idxname=" + idxname +
+                "\">[How to search]</a><br>");
+</script>
+<strong>Display:</strong>
+<select name="max">
+<option value="10">10</option>
+<option selected value="20">20</option>
+<option value="30">30</option>
+<option value="50">50</option>
+<option value="100">100</option>
+</select>
+<strong>Description:</strong>
+<select name="result">
+<option selected value="normal">normal</option>
+<option value="short">short</option>
+</select>
+<strong>Sort:</strong>
+<select name="sort">
+<option selected value="score">by score
+<option value="date:late">in reverse chronological order</option>
+<option value="date:early">in chronological order</option>
+<option value="field:subject:ascending">by title in ascending order</option>
+<option value="field:subject:descending">by title in descending order</option>
+<option value="field:from:ascending">by author in ascending order</option>
+<option value="field:from:descending">by author in descending order</option>
+<option value="field:size:ascending">by size in ascending order</option>
+<option value="field:size:descending">by size in descending order</option>
+<option value="field:uri:ascending">by URI in ascending order</option>
+<option value="field:uri:descending">by URI in descending order</option>
+</select>
+</p>
+</form>
diff --git a/cgi-bin/template/NMZ.head.in b/cgi-bin/template/NMZ.head.in
new file mode 100644 (file)
index 0000000..6d7f091
--- /dev/null
@@ -0,0 +1,81 @@
+<html>
+<head>
+<title>Mail Archive Search</title>
+<style type="text/css"><!--
+  strong.keyword { color: Red; }
+  p.example      { text-indent: 1em; 
+                   color: Navy;
+                  font-weight: bold;
+                   font-family: monospace; }
+  code           { color: Navy;
+                   font-family: monospace; }
+  code.example   { color: Navy;
+                  font-weight: bold;
+                   font-family: monospace; }
+  code.operator  { color: Navy;
+                   font-family: monospace; 
+                  font-weight: bold; }
+--></style>
+<script>
+function getArgs() {
+  var args = new Object();
+  if (location.search.length <= 1) return args;
+  var pairs = location.search.substring(1).split("&");
+  for (var i=0; i < pairs.length; ++i) {
+    var pos = pairs[i].indexOf('=');
+    if (pos < 0) {
+      args[pairs[i]] = "";
+      continue;
+    }
+    args[pairs[i].substring(0,pos)] = unescape(pairs[i].substring(pos+1));
+  }
+  return args;
+}
+var queryArgs = getArgs();
+var idxname = queryArgs["idxname"];
+</script>
+</head>
+<body lang="en">
+<script>
+document.writeln("<h1><a href=\"@@HTML_URL@@/" + idxname +"/\">" +
+                idxname + " archive</a> search</h1>");
+</script>
+<form method="get" action="{cgi}">
+<p><strong>Search String:</strong> 
+<input type="text" name="query" size="40">
+<input type="submit" name="submit" value="Search!">
+<script>
+document.writeln("<input type=\"hidden\" name=\"idxname\" value=\"" + 
+                idxname + "\">");
+document.writeln("<a href=\"{cgi}?idxname=" + idxname +
+                "\">[How to search]</a><br>");
+</script>
+<strong>Display:</strong>
+<select name="max">
+<option value="10">10</option>
+<option selected value="20">20</option>
+<option value="30">30</option>
+<option value="50">50</option>
+<option value="100">100</option>
+</select>
+<strong>Description:</strong>
+<select name="result">
+<option selected value="normal">normal</option>
+<option value="short">short</option>
+</select>
+<strong>Sort:</strong>
+<select name="sort">
+<option selected value="score">by score
+<option value="date:late">in reverse chronological order</option>
+<option value="date:early">in chronological order</option>
+<option value="field:subject:ascending">by title in ascending order</option>
+<option value="field:subject:descending">by title in descending order</option>
+<option value="field:from:ascending">by author in ascending order</option>
+<option value="field:from:descending">by author in descending order</option>
+<option value="field:size:ascending">by size in ascending order</option>
+<option value="field:size:descending">by size in descending order</option>
+<option value="field:uri:ascending">by URI in ascending order</option>
+<option value="field:uri:descending">by URI in descending order</option>
+</select>
+</p>
+</form>
diff --git a/cgi-bin/template/NMZ.head.in.dist b/cgi-bin/template/NMZ.head.in.dist
new file mode 100644 (file)
index 0000000..6d7f091
--- /dev/null
@@ -0,0 +1,81 @@
+<html>
+<head>
+<title>Mail Archive Search</title>
+<style type="text/css"><!--
+  strong.keyword { color: Red; }
+  p.example      { text-indent: 1em; 
+                   color: Navy;
+                  font-weight: bold;
+                   font-family: monospace; }
+  code           { color: Navy;
+                   font-family: monospace; }
+  code.example   { color: Navy;
+                  font-weight: bold;
+                   font-family: monospace; }
+  code.operator  { color: Navy;
+                   font-family: monospace; 
+                  font-weight: bold; }
+--></style>
+<script>
+function getArgs() {
+  var args = new Object();
+  if (location.search.length <= 1) return args;
+  var pairs = location.search.substring(1).split("&");
+  for (var i=0; i < pairs.length; ++i) {
+    var pos = pairs[i].indexOf('=');
+    if (pos < 0) {
+      args[pairs[i]] = "";
+      continue;
+    }
+    args[pairs[i].substring(0,pos)] = unescape(pairs[i].substring(pos+1));
+  }
+  return args;
+}
+var queryArgs = getArgs();
+var idxname = queryArgs["idxname"];
+</script>
+</head>
+<body lang="en">
+<script>
+document.writeln("<h1><a href=\"@@HTML_URL@@/" + idxname +"/\">" +
+                idxname + " archive</a> search</h1>");
+</script>
+<form method="get" action="{cgi}">
+<p><strong>Search String:</strong> 
+<input type="text" name="query" size="40">
+<input type="submit" name="submit" value="Search!">
+<script>
+document.writeln("<input type=\"hidden\" name=\"idxname\" value=\"" + 
+                idxname + "\">");
+document.writeln("<a href=\"{cgi}?idxname=" + idxname +
+                "\">[How to search]</a><br>");
+</script>
+<strong>Display:</strong>
+<select name="max">
+<option value="10">10</option>
+<option selected value="20">20</option>
+<option value="30">30</option>
+<option value="50">50</option>
+<option value="100">100</option>
+</select>
+<strong>Description:</strong>
+<select name="result">
+<option selected value="normal">normal</option>
+<option value="short">short</option>
+</select>
+<strong>Sort:</strong>
+<select name="sort">
+<option selected value="score">by score
+<option value="date:late">in reverse chronological order</option>
+<option value="date:early">in chronological order</option>
+<option value="field:subject:ascending">by title in ascending order</option>
+<option value="field:subject:descending">by title in descending order</option>
+<option value="field:from:ascending">by author in ascending order</option>
+<option value="field:from:descending">by author in descending order</option>
+<option value="field:size:ascending">by size in ascending order</option>
+<option value="field:size:descending">by size in descending order</option>
+<option value="field:uri:ascending">by URI in ascending order</option>
+<option value="field:uri:descending">by URI in descending order</option>
+</select>
+</p>
+</form>
diff --git a/cgi-bin/template/NMZ.result.normal b/cgi-bin/template/NMZ.result.normal
new file mode 100644 (file)
index 0000000..5830a7c
--- /dev/null
@@ -0,0 +1,5 @@
+<dt>${namazu::counter}. <strong><a href="${uri}">${title}</a></strong> (score: ${namazu::score})
+<dd><strong>Author</strong>: <em>HIDDEN</em>
+<dd><strong>Date</strong>: <em>${date}</em>
+<dd>${summary}
+<dd><a href="${uri}">${uri}</a> (${size} bytes)<br><br>
diff --git a/cgi-bin/template/NMZ.result.normal.in b/cgi-bin/template/NMZ.result.normal.in
new file mode 100644 (file)
index 0000000..5830a7c
--- /dev/null
@@ -0,0 +1,5 @@
+<dt>${namazu::counter}. <strong><a href="${uri}">${title}</a></strong> (score: ${namazu::score})
+<dd><strong>Author</strong>: <em>HIDDEN</em>
+<dd><strong>Date</strong>: <em>${date}</em>
+<dd>${summary}
+<dd><a href="${uri}">${uri}</a> (${size} bytes)<br><br>
diff --git a/cgi-bin/template/NMZ.result.normal.in.dist b/cgi-bin/template/NMZ.result.normal.in.dist
new file mode 100644 (file)
index 0000000..cd8d609
--- /dev/null
@@ -0,0 +1,5 @@
+<dt>${namazu::counter}. <strong><a href="${uri}">${title}</a></strong> (score: ${namazu::score})
+<dd><strong>Author</strong>: <em>${author}</em>
+<dd><strong>Date</strong>: <em>${date}</em>
+<dd>${summary}
+<dd><a href="${uri}">${uri}</a> (${size} bytes)<br><br>
diff --git a/cgi-bin/template/NMZ.result.short b/cgi-bin/template/NMZ.result.short
new file mode 100644 (file)
index 0000000..7f087a9
--- /dev/null
@@ -0,0 +1,2 @@
+<dt>${namazu::counter}. <strong><a href="${uri}">${title}</a></strong> (score: ${namazu::score})
+<dd><a href="${uri}">${uri}</a> (${size} bytes)<br><br>
diff --git a/cgi-bin/template/NMZ.result.short.in b/cgi-bin/template/NMZ.result.short.in
new file mode 100644 (file)
index 0000000..7f087a9
--- /dev/null
@@ -0,0 +1,2 @@
+<dt>${namazu::counter}. <strong><a href="${uri}">${title}</a></strong> (score: ${namazu::score})
+<dd><a href="${uri}">${uri}</a> (${size} bytes)<br><br>
diff --git a/cgi-bin/template/NMZ.result.short.in.dist b/cgi-bin/template/NMZ.result.short.in.dist
new file mode 100644 (file)
index 0000000..7f087a9
--- /dev/null
@@ -0,0 +1,2 @@
+<dt>${namazu::counter}. <strong><a href="${uri}">${title}</a></strong> (score: ${namazu::score})
+<dd><a href="${uri}">${uri}</a> (${size} bytes)<br><br>
diff --git a/cgi-bin/template/NMZ.tips b/cgi-bin/template/NMZ.tips
new file mode 100644 (file)
index 0000000..b19d4d6
--- /dev/null
@@ -0,0 +1,60 @@
+<h2><a name="tips">Tips on searching</a></h2>
+
+<p>
+If you have trouble with searching, you can check the following tips.
+</p>
+
+<ul>
+<li>Check a spelling of your keyword<br>
+Namazu can't find anything with wrong spelling.
+
+<li>Add keywords<br>
+
+If you gained no results or too few results, you can add one
+or more related keywords with <code
+class="operator">or</code> operator. It makes your search
+more hittable. e.g., <br>
+<code class="example">tex or ptex or latex or latex2e</code><br>
+
+If you gaind too many results, you can add one or more
+related keywords with <code class="operator">and</code>
+operator. It makes your search more limited. e.g., <br>
+<code class="example">latex and dvi2ps and eps</code>
+
+<li>Try substring matching<br>
+
+If you gained no results or too few results, you can try
+substring matching. 
+
+You can specify <code class="example">tex*</code> to
+search for terms which begin with
+<code>tex</code> (e.g., <code>tex</code>,
+<code>texi2html</code>,
+<code>texindex</code>, <code>text</code>).
+<br>
+
+You can specify <code class="example">*tex</code> to
+search for terms which terminated with <code>tex</code> (e.g.,
+<code>bibtex</code>, 
+<code>jlatex</code>, <code>latex</code>,
+<code>platex</code>, <code>ptex</code>, <code>vertex</code>).
+<br>
+
+You can specify <code class="example">*tex*</code> to
+search for terms which contain <code>tex</code> (many).
+<br>
+
+<li>You tried phrase searching but it hit documents which
+didn't contain your phrase.<br>
+
+It's a defect of Namazu. Precision of phrase searching is
+not 100 %, so it cause wrong results occasionally.
+
+<li>You want to use <code class="operator">and</code>,
+<code class="operator">or</code> or <code
+class="operator">not</code> as ordinary keywords<br>
+You can surround them respectively with double quotes like <code
+class="operator">"..."</code> or braces like <code
+class="operator">{...}</code>.
+
+</ul>
diff --git a/cgi-bin/template/NMZ.tips.in b/cgi-bin/template/NMZ.tips.in
new file mode 100644 (file)
index 0000000..b19d4d6
--- /dev/null
@@ -0,0 +1,60 @@
+<h2><a name="tips">Tips on searching</a></h2>
+
+<p>
+If you have trouble with searching, you can check the following tips.
+</p>
+
+<ul>
+<li>Check a spelling of your keyword<br>
+Namazu can't find anything with wrong spelling.
+
+<li>Add keywords<br>
+
+If you gained no results or too few results, you can add one
+or more related keywords with <code
+class="operator">or</code> operator. It makes your search
+more hittable. e.g., <br>
+<code class="example">tex or ptex or latex or latex2e</code><br>
+
+If you gaind too many results, you can add one or more
+related keywords with <code class="operator">and</code>
+operator. It makes your search more limited. e.g., <br>
+<code class="example">latex and dvi2ps and eps</code>
+
+<li>Try substring matching<br>
+
+If you gained no results or too few results, you can try
+substring matching. 
+
+You can specify <code class="example">tex*</code> to
+search for terms which begin with
+<code>tex</code> (e.g., <code>tex</code>,
+<code>texi2html</code>,
+<code>texindex</code>, <code>text</code>).
+<br>
+
+You can specify <code class="example">*tex</code> to
+search for terms which terminated with <code>tex</code> (e.g.,
+<code>bibtex</code>, 
+<code>jlatex</code>, <code>latex</code>,
+<code>platex</code>, <code>ptex</code>, <code>vertex</code>).
+<br>
+
+You can specify <code class="example">*tex*</code> to
+search for terms which contain <code>tex</code> (many).
+<br>
+
+<li>You tried phrase searching but it hit documents which
+didn't contain your phrase.<br>
+
+It's a defect of Namazu. Precision of phrase searching is
+not 100 %, so it cause wrong results occasionally.
+
+<li>You want to use <code class="operator">and</code>,
+<code class="operator">or</code> or <code
+class="operator">not</code> as ordinary keywords<br>
+You can surround them respectively with double quotes like <code
+class="operator">"..."</code> or braces like <code
+class="operator">{...}</code>.
+
+</ul>
diff --git a/cgi-bin/template/NMZ.tips.in.dist b/cgi-bin/template/NMZ.tips.in.dist
new file mode 100644 (file)
index 0000000..b19d4d6
--- /dev/null
@@ -0,0 +1,60 @@
+<h2><a name="tips">Tips on searching</a></h2>
+
+<p>
+If you have trouble with searching, you can check the following tips.
+</p>
+
+<ul>
+<li>Check a spelling of your keyword<br>
+Namazu can't find anything with wrong spelling.
+
+<li>Add keywords<br>
+
+If you gained no results or too few results, you can add one
+or more related keywords with <code
+class="operator">or</code> operator. It makes your search
+more hittable. e.g., <br>
+<code class="example">tex or ptex or latex or latex2e</code><br>
+
+If you gaind too many results, you can add one or more
+related keywords with <code class="operator">and</code>
+operator. It makes your search more limited. e.g., <br>
+<code class="example">latex and dvi2ps and eps</code>
+
+<li>Try substring matching<br>
+
+If you gained no results or too few results, you can try
+substring matching. 
+
+You can specify <code class="example">tex*</code> to
+search for terms which begin with
+<code>tex</code> (e.g., <code>tex</code>,
+<code>texi2html</code>,
+<code>texindex</code>, <code>text</code>).
+<br>
+
+You can specify <code class="example">*tex</code> to
+search for terms which terminated with <code>tex</code> (e.g.,
+<code>bibtex</code>, 
+<code>jlatex</code>, <code>latex</code>,
+<code>platex</code>, <code>ptex</code>, <code>vertex</code>).
+<br>
+
+You can specify <code class="example">*tex*</code> to
+search for terms which contain <code>tex</code> (many).
+<br>
+
+<li>You tried phrase searching but it hit documents which
+didn't contain your phrase.<br>
+
+It's a defect of Namazu. Precision of phrase searching is
+not 100 %, so it cause wrong results occasionally.
+
+<li>You want to use <code class="operator">and</code>,
+<code class="operator">or</code> or <code
+class="operator">not</code> as ordinary keywords<br>
+You can surround them respectively with double quotes like <code
+class="operator">"..."</code> or braces like <code
+class="operator">{...}</code>.
+
+</ul>