help.jsp revision 1278
98N/A<%--
98N/ACDDL HEADER START
606N/A
744N/AThe contents of this file are subject to the terms of the
98N/ACommon Development and Distribution License (the "License").
98N/AYou may not use this file except in compliance with the License.
98N/A
98N/ASee LICENSE.txt included in this distribution for the specific
98N/Alanguage governing permissions and limitations under the License.
98N/A
98N/AWhen distributing Covered Code, include this CDDL HEADER in each
98N/Afile and include the License file at LICENSE.txt.
98N/AIf applicable, add the following below this CDDL HEADER, with the
98N/Afields enclosed by brackets "[]" replaced with your own identifying
98N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
98N/A
98N/ACDDL HEADER END
98N/A
98N/ACopyright 2007 Sun Microsystems, Inc. All rights reserved.
98N/AUse is subject to license terms.
98N/A
98N/APortions Copyright 2011 Jens Elkner.
98N/A
98N/A--%><%@ page session="false" errorPage="error.jsp" import="
98N/Aorg.opensolaris.opengrok.web.PageConfig"
98N/A%><%
98N/A/* ---------------------- help.jsp start --------------------- */
98N/A{
98N/A cfg = PageConfig.get(request);
98N/A cfg.setTitle("OpenGrok Help");
830N/A%><%@
98N/A
98N/Ainclude file="httpheader.jspf"
98N/A
810N/A%>
810N/A<body>
810N/A <div id="page">
810N/A <div id="whole_header">
354N/A <div id="header"><%@
354N/A
354N/Ainclude file="pageheader.jspf"
354N/A
354N/A %></div>
354N/A <div id="Masthead"></div>
354N/A </div>
354N/A <div id="sbar">
606N/A <div id="menu"><%@
810N/A
606N/Ainclude file="menu.jspf"
606N/A
354N/A%>
810N/A </div>
824N/A </div>
810N/A <div id="help">
830N/A<p>
810N/AA <dfn>Query</dfn> is a series of clauses. A clause may be prefixed by:</p>
810N/A<ul>
810N/A <li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause
810N/A is required or prohibited respectively; or</li>
810N/A <li>a <dfn>term</dfn> followed by a colon "<b>:</b>", indicating the
810N/A <dfn>field</dfn> to be searched. This enables one to construct queries
810N/A which search multiple <dfn>fields</dfn>.</li>
810N/A</ul>
810N/A<p>A clause may be either:</p>
810N/A<ul>
810N/A <li>a <dfn>term</dfn>, indicating all the documents that contain this term;
810N/A or</li>
810N/A <li>a <dfn>phrase</dfn> - group of words surrounded by double quotes
810N/A <b>" "</b>, e.g. "hello dolly" </li>
810N/A <li>a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also
810N/A called query/field <dfn>grouping</dfn>) . Note that this may be used
810N/A with a +/- prefix to require any of a set of terms. </li>
810N/A <li>boolean <dfn>operators</dfn> which allow terms to be combined through
810N/A logic operators. Supported are <b>AND</b>(<b>&amp;&amp;</b>), "<b>+</b>",
810N/A <b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they
810N/A must be ALL CAPS).</li>
810N/A</ul>
810N/A<p>Wildcard, Fuzzy, Proximity &amp; Range Searches:</p>
810N/A<ul>
810N/A <li>to perform a single character wildcard search use the "<b>?</b>" symbol,
810N/A e.g. te?t</li>
810N/A <li>to perform a multiple character wildcard search use the "<b>*</b>"
810N/A symbol, e.g. test* or te*t</li>
810N/A <li>you cannot use a * or ? symbol as the first character of a search
810N/A (unless enabled using indexer option -a).</li>
810N/A <li>to do a fuzzy search(find words similar in spelling, based on the
98N/A Levenshtein Distance, or Edit Distance algorithm) use the tilde,
824N/A "<b>~</b>", e.g. rcs~ </li>
98N/A <li>to do a proximity search use the tilde, "~", symbol at the end of a
98N/A Phrase. For example to search for a "opengrok" and "help" within 10
830N/A words of each other enter: "opengrok help"~10 </li>
824N/A <li>range queries allow one to match documents whose field(s) values are
571N/A between the lower and upper bound specified by the Range Query. Range
98N/A Queries can be inclusive or exclusive of the upper and lower bounds.
98N/A Sorting is done lexicographically. Inclusive queries are denoted by
98N/A square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>.
341N/A For example: title:{Aida TO Carmen} - will find all documents between
366N/A Aida to Carmen, exclusive of Aida and Carmen. </li>
354N/A</ul>
425N/A
325N/A<a id="escaping"><dfn>Escaping special characters:</dfn></a>
456N/A<p>Opengrok supports escaping special characters that are part of the query
577N/A syntax. Current special characters are:<br/>
325N/A <b>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \ </b><br/>
354N/ATo escape these character use the \ before the character. For example to search
278N/Afor <b>(1+1):2</b> use the query: <b>\(1\+1\)\:2</b>
98N/A</p>
543N/A<p>NOTE on analyzers: Indexed words are made up of Alpha-Numeric and Underscore
98N/Acharacters. One letter words are usually not indexed as symbols!<br/>
749N/AMost other characters(including single and double quotes) are treated as
749N/A"spaces/whitespace"(so even if you escape them, they will not be found, since
98N/Amost analyzers ignore them). <br/>
151N/AThe exceptions are: <b>@ $ % ^ &amp; = ? . :</b> which are mostly indexed as
137N/Aseparate words.<br/>
153N/ABecause some of them are part of the query syntax, they must be escaped with a
210N/Areverse slash as noted above.<br/>
366N/ASo searching for <b>\+1</b> or <b>\+ 1</b> will both find <b>+1</b> and <b>+ 1</b>.
98N/A</p>
179N/A
269N/A<p>valid <dfn>FIELDs</dfn> are</p>
126N/A <dl class="fields">
98N/A<dt>full</dt>
98N/A<dd>Search through all text tokens(words,strings,identifiers,numbers) in index.</dd>
98N/A
287N/A<dt>defs</dt>
366N/A<dd>Only finds symbol definitions.</dd>
499N/A
123N/A<dt>refs</dt>
98N/A<dd>Only finds symbols.</dd>
98N/A
98N/A<dt>path</dt>
98N/A<dd>path of the source file.</dd>
577N/A
498N/A<dt>hist</dt>
98N/A<dd>History log comments.</dd>
98N/A </dl>
98N/A
98N/A<p>
98N/Athe term(phrases) can be boosted (making it more relevant) using a caret
98N/A<b>^</b> , e.g. help^4 opengrok - will make term help boosted
98N/A</p>
744N/A
747N/A<dfn><b>Examples:</b></dfn>
744N/A<pre class="example">
744N/A
744N/ATo find where setResourceMonitors is defined: <a
493N/Ahref="search?q=&amp;defs=setResourceMonitors">defs:setResourceMonitors</a>
493N/A
98N/ATo find files that use sprintf in usr/src/cmd/cmd-inet/usr.sbin/:
493N/A<a href="search?refs=sprintf&amp;path=usr%2Fsrc%2Fcmd%2Fcmd-inet%2Fusr.sbin%2F"
493N/A>refs:sprintf path:usr/src/cmd/cmd-inet/usr.sbin</a>
493N/A
810N/ATo find assignments to variable Asign:
<a href="search?q=%22asign+%3D+%22">"Asign="</a>
To find Makefiles where pstack binary is being built:
<a href="search?q=pstack&amp;path=Makefile">pstack path:Makefile</a>
to search for phrase "Bill Joy":
<a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
To find perl files that do not use /usr/bin/perl but something else:
<a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22"
>-"/usr/bin/perl" +"/bin/perl"</a>
To find all strings begining with foo use the wildcard:
<a href="search?q=foo*">foo*</a>
To find all files which have . c in their name(dot is a token!):
<a href="search?path=%22. c%22">". c"</a>
</pre>
<p>Opengrok search is powered by <a href="http://lucene.apache.org/"
>lucene</a>, for more detail on query syntax refer to lucene docs.</p>
</div>
<%
}
/* ---------------------- help.jsp end --------------------- */
%><%@
include file="foot.jspf"
%>