1 <h2><a name="query">Query</a></h2>
3 <h3><a name="query-term">Single term query</a></h3>
5 The query specifies only one term for retrieving all
6 documents which contain the term. e.g.,
13 <h3><a name="query-and">AND query</a></h3>
16 The query specifies two or more terms for retrieving all
17 documents which contain both terms. You can insert the
18 <code class="operator">and</code> operator between the terms. e.g.,
26 You can ommit the <code class="operator">and</code> operator. Terms which is
27 separated by one ore more spaces is assumed to be AND query.
30 <h3><a name="query-or">OR query</a></h3>
32 The query specifies two or more terms for retrieving all
33 documents which contain either term. You can insert the
34 <code class="operator">or</code> operator between the terms.
42 <h3><a name="query-not">NOT query</a></h3>
44 The query specifies two or more terms for retrieving all
45 documents which contain a first term but does't contain the
46 following terms. You can insert the <code class="operator">not</code>
47 operator between the terms to do NOT query. e.g.,
55 <h3><a name="query-grouping">Grouping</a></h3>
57 You can group queries by surrounding them by
58 parentheses. The parentheses should be separated by one or
63 ( Linux or FreeBSD ) and Netscape not Windows
66 <h3><a name="query-phrase">Phrase searching</a></h3>
68 You can search for a phrase which consists of two or more terms
69 by surrounding them with double quotes like
70 <code class="operator">"..."</code> or with braces like <code class="operator">{...}</code>.
71 In Namazu, precision of phrase searching is not 100 %,
72 so it causes wrong results occasionally. e.g.,
81 You must choose the latter with Tkanamzu or namazu.el.
85 <h3><a name="query-substring">Substring matching</a></h3>
87 The are three types of substring matching searching.
92 <dd><code class="example">inter*</code> (terms which begin with <code>inter</code>)
94 <dd><code class="example">*text*</code> (terms which contain <code>text</code>)
96 <dd><code class="example">*net</code> (terms which terminated
97 with <code>net</code>)
101 <h3><a name="query-regex">Regular expressions</a></h3>
104 You can use regular expressions for pattern matching. The
105 regular expressions must be surrounded by slashes like <code
106 class="operator">/.../</code>. Namazu uses <a
107 href="http://www.ruby-lang.org/">Ruby</a>'s regular
108 regular expressions engine. It offers generally <a
109 href="http://www.perl.com/">Perl</a> compatible flavor.
118 <h3><a name="query-field">Field-specified searching</a></h3>
120 You can limit your search to specific fields such as
121 <code>Subject:</code>, <code>From:</code>,
122 <code>Message-Id:</code>. It's especially convenient for
123 Mail/News documents. e.g.,
127 <li><code class="example">+subject:Linux</code><br>
128 (Retrieving all documents which contain <code>Linux</code>
129 in a <code>Subject:</code> field)
131 <li><code class="example">+subject:"GNU Emacs"</code><br>
132 (Retrieving all documents which contain <code>GNU Emacs</code>
133 in a <code>Subject:</code> field)
135 <li><code class="example">+from:foo@bar.jp</code><br>
136 (Retrieving all documents which contain <code>foo@bar.jp</code>
137 in a <code>From:</code> field)
140 <li><code class="example">+message-id:<199801240555.OAA18737@foo.bar.jp></code><br>
141 (Retrieving a certain document which contains specified
142 <code>Message-Id:</code>)
145 <h3><a name="query-notes">Notes</a></h3>
148 <li>In any queries, Namazu ignores case distinctions of
149 alphabet characters. In other words, Namazu does
150 case-insensitive pattern matching in any time.
153 <li>Japanese phrases are forced to be segmented into
154 morphemes automatically and are handled them as <a
155 href="#query-phrase">phrase searching</a>. This processing
156 causes invalid segmentation occasionally.
159 <li>Alphabet, numbers or a part of symbols (duplicated in
160 ASCII) characters which defined in JIS X 0208 (Japanese
161 Industrial Standards) are handled as ASCII characters.
163 <li>Namazu can handle a term which contains symbols like
164 <code>TCP/IP</code>. Since this handling isn't complete,
165 you can describe <code>TCP and IP</code> instead of
166 <code>TCP/IP</code>, but it may cause noisy results.
169 <li>Substring matching and field-specified searching takes
170 more time than other methods.
172 <li>If you want to use <code class="operator">and</code>,
173 <code class="operator">or</code> or <code
174 class="operator">not</code> simply as terms, you can
175 surround them respectively with double quotes like <code
176 class="operator">"..."</code> or braces like <code
177 class="operator">{...}</code>.
180 You must choose the latter with Tkanamzu or namazu.el.