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