help.jsp revision c6e0f8b39af7343c04ec7558a085c965159f4ea0
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye<%--
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCDDL HEADER START
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeThe contents of this file are subject to the terms of the
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCommon 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
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye--%><%@ page import = "org.opensolaris.opengrok.configuration.RuntimeEnvironment"
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye session="false" errorPage="error.jsp" %><%
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeRuntimeEnvironment environment = RuntimeEnvironment.getInstance();
24fbcf818bcfacfba1bae434e85950953238e31bLeo Davisenvironment.register();
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeString pageTitle = "OpenGrok Help";
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye%><%@ include file="httpheader.jspf" %>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye<body>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <div id="page">
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <div id="header"><%@ include file="pageheader.jspf" %> </div>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <div id="Masthead"></div>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <div id="bar">
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <table cellpadding="0" cellspacing="0" border="0" width="100%">
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <tr><td valign="top"><br /> &nbsp;</td><td align="left" valign="middle"><br/>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <form action="search" name="sbox">
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <table cellpadding="2" border="0" cellspacing="0">
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <tr><td align="right"> Full&nbsp;Search (q) </td><td><input class="q" name="q" size="45" value=""/></td></tr>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <tr><td align="right"> Definition (defs) </td><td><input class="q" name="defs" size="25" value=""/></td></tr>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <tr><td align="right"> Symbol (refs) </td><td><input class="q" name="refs" size="25" value=""/></td></tr>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <tr><td align="right"> File&nbsp;Path (path) </td><td><input class="q" name="path" size="25" value=""/></td></tr>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <tr><td align="right"> History (hist) </td><td><input class="q" name="hist" size="25" value=""/></td></tr>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <tr><td></td><td> &nbsp; <input class="submit" type="submit" value=" Search "/> | <input class="submit" onClick="document.sbox.q.value='';document.sbox.defs.value='';document.sbox.refs.value='';document.sbox.path.value='';document.sbox.hist.value='';" type="button" value=" Clear "/></td></tr>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye </table>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye </form>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye </td></tr></table>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye </div>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <div id="results"><p>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco A <u>Query</u> is a series of clauses. A clause may be prefixed by:
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <ul>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause is required or prohibited respectively; or</li>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li>a <u>term</u> followed by a colon "<b>:</b>", indicating the <u>field</u> to be searched. This enables one to construct queries which search multiple <u>fields</u>.</li>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye </ul>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye A clause may be either:
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <ul>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li> a <u>term</u>, indicating all the documents that contain this term; or</li>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li> a <u>phrase</u> - group of words surrounded by double quotes <b>" "</b>, e.g. "hello dolly" </li>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li> a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also called query/field <u>grouping</u>) . Note that this may be used with a +/- prefix to require any of a set of terms. </li>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li> boolean <u>operators</u> which allow terms to be combined through logic operators. Supported are <b>AND</b>(<b>&&</b>), "<b>+</b>", <b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they must be ALL CAPS).</li>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye </ul>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco Wildcard, Fuzzy, Proximity & Range Searches:
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <ul>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li> to perform a single character wildcard search use the "<b>?</b>" symbol, e.g. te?t</li>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li> to perform a multiple character wildcard search use the "<b>*</b>" symbol, e.g. test* or te*t</li>
c6e0f8b39af7343c04ec7558a085c965159f4ea0Lubos Kosco <li> you cannot use a * or ? symbol as the first character of a search (unless enabled using indexer option -a).</li>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li> to do a fuzzy search(find words similar in spelling, based on the Levenshtein Distance, or Edit Distance algorithm) use the tilde, "<b>~</b>", e.g. rcs~ </li>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li> to do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "opengrok" and "help" within 10 words of each other enter: "opengrok help"~10 </li>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <li> range queries allow one to match documents whose field(s) values are between the lower and upper bound specified by the Range Query. Range Queries can be inclusive or exclusive of the upper and lower bounds. Sorting is done lexicographically. Inclusive queries are denoted by square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>. For example: title:{Aida TO Carmen} - will find all documents between Aida to Carmen, exclusive of Aida and Carmen. </li>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco </ul>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <a name="escaping"><u>Escaping special characters:</u></a>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <p>Opengrok supports escaping special characters that are part of the query syntax. The current list special characters are:<br/>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <b>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \ </b><br/>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco To escape these character use the \ before the character. For example to search for (1+1):2 use the query: \(1\+1\)\:2</p>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco valid <u>FIELDs</u> are
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <pre>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <b>full:</b> Full text search.
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <b>defs:</b> Only finds symbol definitions.
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <b>refs:</b> Only finds symbols.
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <b>path:</b> path of the source file.
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <b>hist:</b> History log comments
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye </pre>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <p>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco the term(phrases) can be boosted(making it more relevant) using a caret <b>^</b> , e.g. help^4 opengrok - will make term help boosted
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco </p>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <u><b>Examples:</b></u>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <pre>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco To find where setResourceMonitors is defined
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <a href="search?q=&defs=setResourceMonitors">defs:setResourceMonitors</a>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco To find files that use sprintf in usr/src/cmd/cmd-inet/usr.sbin/
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <a href="search?refs=sprintf&path=usr%2Fsrc%2Fcmd%2Fcmd-inet%2Fusr.sbin%2F">refs:sprintf path:usr/src/cmd/cmd-inet/usr.sbin</a>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco To find assignments to variable Asign
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <a href="search?q=%22asign+%3D+%22">"Asign="</a>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco To find Makefiles where pstack binary is being built
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <a href="search?q=pstack&path=Makefile">pstack path:Makefile</a>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco to search for phrase "Bill Joy":
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco To find perl files that do not use /usr/bin/perl but something else,
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22">-"/usr/bin/perl" +"/bin/perl"</a>
c6e0f8b39af7343c04ec7558a085c965159f4ea0Lubos Kosco
c6e0f8b39af7343c04ec7558a085c965159f4ea0Lubos Kosco To find all strings begining with foo use the wildcard,
c6e0f8b39af7343c04ec7558a085c965159f4ea0Lubos Kosco <a href="search?q=foo*">foo*</a>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco </pre>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco <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>
ac3dfe115c31432f257a9c4831f6950cd3849143Lubos Kosco </p>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye </div>
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye <%@include file="foot.jspf"%>