<%@ page language="java" buffer="100kb" errorPage="/common/error.jsp"%>

<%@ taglib uri="struts-html" prefix="html"%>
<%@ taglib uri="struts-bean" prefix="bean"%>
<%@ taglib uri="vkc-taglib"  prefix="vkc" %>

<html:html locale="true">
<head>
  <vkc:init/>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta http-equiv="expires" content="0">
  <meta name="description" content="VKC Help: Syntax of Search Patterns">

  <vkc:cssinclude />

  <title><vkc:message key="vkc" /></title>
  <script type="text/javascript" src="<vkc:rewrite page='/common/utils.js'/>"></script>

  <script type="text/javascript">

  window.name = "MAINVIEW";

  function init() {
  }
  
  function confirmation(){
    return confirm('<vkc:message javascript="true" filter="false" key="vkc.string.confirmation"/>');
  }

  </script>
</head>

<!-- ENGLISH VERSION ************************************************** -->

<!-- Version 29-Nov-2004 -->

<body onload="init();">
<a name="top"></a>

<h2>
<a name="searchstring"></a>
VKC Help: Syntax of Search Patterns</h2>

<p>
This help page explains the syntax of search patterns that can be used
in the <b>advanced search</b> form and also in the definition of
a <b>query for virtual documents</b>.
<a href="#queries">Examples</a> can be found in the table at the end of this page.
</p>

<p>
<b>Words and Phrases</b><br>
Multiple words in a search string are treated separately.
If the words shall be handled as a phrase to be searched for,
the phrase must be included in double quotes.<br>
Within a word or at its end <b>wildcards</b> may be used to include
variations of a word.
A question mark '?' is a substitute for any single character.
An asterisk '*' replaces any string of characters including
an empty string. Wildcards are not allowed at the beginning of a word.
</p>

<p>
<b>Fields</b><br>
VKCSearch can limit its search to different <b>fields</b> of a document:
<b>title</b>, <b>keywords</b>, and <b>author</b>.
If no field is specified before a search term,
the document text is searched.
A field is specified by the field name followed by a colon.
</p>

<p>
<b>Boolean Operators</b><br>
The search string may include multiple terms combined by boolean operators:
<b>OR</b>, <b>AND</b>, <b>NOT</b>. Parentheses may be used for grouping.
The <b>default operator</b> for combining multiple terms is OR.
</p>

<p>
<b>Required and Prohibited Words</b><br>
A <b>plus</b> sign directly in front of a search term means that the term
must be found in a document to match the search string. <br>
A <b>minus</b> sign at the beginning of a search term means that documents
containing the term are to be excluded from the results.
</p>

<p>
<b>Case Significance</b><br>
Please note that upper or lower case letters are not distinguished
in words to be searched. Case is only significant for boolean operators
in the search string (OR, AND, NOT); they must be denoted in all upper case.
</p>

<p>
<b>Special Characters</b><br>
The following characters have a special meaning and must be escaped
by a backslash '\' if they are included in a search term as simple characters:
+&nbsp;-&nbsp;&amp;&amp;&nbsp;||&nbsp;!&nbsp;(&nbsp;)&nbsp;{&nbsp;}&nbsp;[&nbsp;]&nbsp;^
&nbsp;"&nbsp;~&nbsp;*&nbsp;?&nbsp;:&nbsp;\
</p>

<p><a name="queries"></a>
<b>Search String Examples</b>
</p>
<table border=1 cellspacing=3 cellpadding=3>
<tr>
<td>
<b>Searching for ...</b>
</td>
<td>
<b>Example</b>
</td>
<td>
<b>Results</b>
</td>
</tr>
<tr>
<td>a single word in the text</td>
<td><tt>knowledge</tt></td>
<td>all documents containing the word <i>knowledge</i> in their text</td>
</tr>
<tr>
<td>a single word in the text using a wildcard</td>
<td><tt>bio*</tt></td>
<td>all documents containing words beginning with <i>bio</i> in their text</td>
</tr>
<tr>
<td>a single word in a field</td>
<td><tt>title:knowledge</tt></td>
<td>all documents containing the word <i>knowledge</i> in their title</td>
</tr>
<tr>
<td>multiple words (OR)</td>
<td><tt>knowledge management</tt><br>
<small>equivalent with</small><br>
<tt>knowledge&nbsp;OR&nbsp;management</tt></td>
<td>all documents containing either <i>knowledge</i> or <i>management</i>
or both in their text</td>
</tr>
<tr>
<td>multiple words (AND)</td>
<td><tt>knowledge&nbsp;AND&nbsp;management</tt><br>
</td>
<td>all documents containing both <i>knowledge</i> and <i>management</i>
in their text</td>
</tr>
<tr>
<td>multiple words,<br>a required word</td>
<td><tt>+knowledge management</tt></td>
<td>all documents containing at least <i>knowledge</i> 
or both words in their text</td>
</tr>
<td>multiple words,<br>a prohibited word</td>
<td><tt>knowledge -management</tt><br>
<small>equivalent with</small><br>
<tt>knowledge&nbsp;NOT&nbsp;management</tt></td>
<td>all documents containing <i>knowledge</i> but not
<i>management</i> in their text</td>
</tr>
<tr>
<td>a single string consisting of multiple words (phrase)</td>
<td><tt>"knowledge management"</tt></td>
<td>all documents containing the string <i>knowledge management</i>
in their text</td>
</tr>
</table>

<p>
Additional, more sophisticated features are described in the online
documentation of the <b>Jakarta Lucene</b> search engine at
<a href="http://jakarta.apache.org/lucene/docs/queryparsersyntax.html">
jakarta.apache.org/lucene/docs/queryparsersyntax.html</a>.
</p>

<!-- DOCUMENT FOOTER ************************************************** -->

<hr>
<p>
<b>Attention:</b>
<br>
Please use the <b>back</b> button of your browser for returning
to the previous help page. 
</p>

<img src="vkc-versioninfo.gif" alt="Version information" border="0">

</body>
</html:html>