help.jsp revision 59b6a8c0cc6ef741a7180504b3c371e67c2aa338
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen<%--
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCDDL HEADER START
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeThe contents of this file are subject to the terms of the
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenCommon Development and Distribution License (the "License").
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeYou may not use this file except in compliance with the License.
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeSee LICENSE.txt included in this distribution for the specific
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbyelanguage governing permissions and limitations under the License.
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeWhen distributing Covered Code, include this CDDL HEADER in each
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbyefile and include the License file at LICENSE.txt.
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeIf applicable, add the following below this CDDL HEADER, with the
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbyefields enclosed by brackets "[]" replaced with your own identifying
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbyeinformation: Portions Copyright [yyyy] [name of copyright owner]
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCDDL HEADER END
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCopyright 2007 Sun Microsystems, Inc. All rights reserved.
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeUse is subject to license terms.
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerPortions Copyright 2011 Jens Elkner.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner--%><%@ page session="false" errorPage="error.jsp" import="
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerorg.opensolaris.opengrok.web.PageConfig"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner%><%
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- help.jsp start --------------------- */
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner{
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen cfg = PageConfig.get(request);
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen cfg.setTitle("OpenGrok Help");
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner%><%@
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerinclude file="httpheader.jspf"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner%>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye<body>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="page">
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="whole_header">
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="header"><%@
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerinclude file="pageheader.jspf"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen %></div>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="Masthead"></div>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen </div>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="sbar">
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="menu"><%@
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerinclude file="menu.jspf"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner%>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen </div>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen </div>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="help">
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerA <dfn>Query</dfn> is a series of clauses. A clause may be prefixed by:</p>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<ul>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen is required or prohibited respectively; or</li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a <dfn>term</dfn> followed by a colon "<b>:</b>", indicating the
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <dfn>field</dfn> to be searched. This enables one to construct queries
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen which search multiple <dfn>fields</dfn>.</li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner</ul>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>A clause may be either:</p>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<ul>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a <dfn>term</dfn>, indicating all the documents that contain this term;
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen or</li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a <dfn>phrase</dfn> - group of words surrounded by double quotes
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <b>" "</b>, e.g. "hello dolly" </li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen called query/field <dfn>grouping</dfn>) . Note that this may be used
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen with a +/- prefix to require any of a set of terms. </li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>boolean <dfn>operators</dfn> which allow terms to be combined through
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen logic operators. Supported are <b>AND</b>(<b>&amp;&amp;</b>), "<b>+</b>",
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen must be ALL CAPS).</li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner</ul>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>Wildcard, Fuzzy, Proximity &amp; Range Searches:</p>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<ul>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>to perform a single character wildcard search use the "<b>?</b>" symbol,
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen e.g. te?t</li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>to perform a multiple character wildcard search use the "<b>*</b>"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen symbol, e.g. test* or te*t</li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>you cannot use a * or ? symbol as the first character of a search
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen (unless enabled using indexer option -a).</li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>to do a fuzzy search(find words similar in spelling, based on the
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Levenshtein Distance, or Edit Distance algorithm) use the tilde,
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen "<b>~</b>", e.g. rcs~ </li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>to do a proximity search use the tilde, "~", symbol at the end of a
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Phrase. For example to search for a "opengrok" and "help" within 10
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen words of each other enter: "opengrok help"~10 </li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>range queries allow one to match documents whose field(s) values are
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen between the lower and upper bound specified by the Range Query. Range
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Queries can be inclusive or exclusive of the upper and lower bounds.
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Sorting is done lexicographically. Inclusive queries are denoted by
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>.
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen For example: title:{Aida TO Carmen} - will find all documents between
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Aida to Carmen, exclusive of Aida and Carmen. </li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner</ul>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a id="escaping"><dfn>Escaping special characters:</dfn></a>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen<p>Opengrok supports escaping special characters that are part of the query
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen syntax. Current special characters are:<br/>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <b>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \ </b><br/>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenTo escape these character use the \ before the character. For example to search
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerfor <b>(1+1):2</b> use the query: <b>\(1\+1\)\:2</b>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen</p>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen<p>NOTE on analyzers: Indexed words are made up of Alpha-Numeric and Underscore
14a41f02433890d19b2f871156271e3388cd0845Jens Elknercharacters. One letter words are usually not indexed as symbols!<br/>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenMost other characters(including single and double quotes) are treated as
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen"spaces/whitespace"(so even if you escape them, they will not be found, since
14a41f02433890d19b2f871156271e3388cd0845Jens Elknermost analyzers ignore them). <br/>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenThe exceptions are: <b>@ $ % ^ &amp; = ? . :</b> which are mostly indexed as
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerseparate words.<br/>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenBecause some of them are part of the query syntax, they must be escaped with a
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerreverse slash as noted above.<br/>
e655c7911217c7948ee6d9eb73bff3a712b0fa70Lubos KoscoSo searching for <b>\+1</b> or <b>\+ 1</b> will both find <b>+1</b> and <b>+ 1</b>.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner</p>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>valid <dfn>FIELDs</dfn> are</p>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <dl class="fields">
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>full</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>Search through all text tokens(words,strings,identifiers,numbers) in index.</dd>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>defs</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>Only finds symbol definitions.</dd>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>refs</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>Only finds symbols.</dd>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>path</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>path of the source file.</dd>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>hist</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>History log comments.</dd>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen </dl>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlenthe term(phrases) can be boosted (making it more relevant) using a caret
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<b>^</b> , e.g. help^4 opengrok - will make term help boosted
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner</p>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dfn><b>Examples:</b></dfn>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<pre class="example">
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenTo find where setResourceMonitors is defined: <a
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerhref="search?q=&amp;defs=setResourceMonitors">defs:setResourceMonitors</a>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenTo find files that use sprintf in usr/src/cmd/cmd-inet/usr.sbin/:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?refs=sprintf&amp;path=usr%2Fsrc%2Fcmd%2Fcmd-inet%2Fusr.sbin%2F"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner>refs:sprintf path:usr/src/cmd/cmd-inet/usr.sbin</a>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerTo find assignments to variable Asign:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=%22asign+%3D+%22">"Asign="</a>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenTo find Makefiles where pstack binary is being built:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=pstack&amp;path=Makefile">pstack path:Makefile</a>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlento search for phrase "Bill Joy":
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenTo find perl files that do not use /usr/bin/perl but something else:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner>-"/usr/bin/perl" +"/bin/perl"</a>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerTo find all strings begining with foo use the wildcard:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=foo*">foo*</a>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
8e4e27126852837892d11016ca62f6b8f51997b8Lubos KoscoTo find all files which have . c in their name(dot is a token!):
8e4e27126852837892d11016ca62f6b8f51997b8Lubos Kosco<a href="search?path=%22. c%22">". c"</a>
8e4e27126852837892d11016ca62f6b8f51997b8Lubos Kosco
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner</pre>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>Opengrok search is powered by <a href="http://lucene.apache.org/"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner>lucene</a>, for more detail on query syntax refer to lucene docs.</p>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen </div>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<%
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner}
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- help.jsp end --------------------- */
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner%><%@
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerinclude file="foot.jspf"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner%>