source: sandbox/expresso-solr/solr/docs/api/org/apache/solr/search/QueryUtils.html @ 7588

Revision 7588, 17.0 KB checked in by adir, 11 years ago (diff)

Ticket #000 - Adicionando a integracao de buscas com Solr na base a ser isnerida na comunidade

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_24) on Mon Jun 25 15:26:25 EDT 2012 -->
6<META http-equiv="Content-Type" content="text/html; charset=utf-8">
7<TITLE>
8QueryUtils (Solr 4.0.0-ALPHA API)
9</TITLE>
10
11<META NAME="date" CONTENT="2012-06-25">
12
13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
14
15<SCRIPT type="text/javascript">
16function windowTitle()
17{
18    if (location.href.indexOf('is-external=true') == -1) {
19        parent.document.title="QueryUtils (Solr 4.0.0-ALPHA API)";
20    }
21}
22</SCRIPT>
23<NOSCRIPT>
24</NOSCRIPT>
25
26</HEAD>
27
28<BODY BGCOLOR="white" onload="windowTitle();">
29<HR>
30
31
32<!-- ========= START OF TOP NAVBAR ======= -->
33<A NAME="navbar_top"><!-- --></A>
34<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36<TR>
37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38<A NAME="navbar_top_firstrow"><!-- --></A>
39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40  <TR ALIGN="center" VALIGN="top">
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/QueryUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../org/apache/solr/search/QueryResultKey.html" title="class in org.apache.solr.search"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/solr/search/RawQParserPlugin.html" title="class in org.apache.solr.search"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/solr/search/QueryUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="QueryUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.solr.search</FONT>
92<BR>
93Class QueryUtils</H2>
94<PRE>
95<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.solr.search.QueryUtils</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public class <B>QueryUtils</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
101</PRE>
102
103<P>
104<HR>
105
106<P>
107
108<!-- ======== CONSTRUCTOR SUMMARY ======== -->
109
110<A NAME="constructor_summary"><!-- --></A>
111<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
112<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
113<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
114<B>Constructor Summary</B></FONT></TH>
115</TR>
116<TR BGCOLOR="white" CLASS="TableRowColor">
117<TD><CODE><B><A HREF="../../../../org/apache/solr/search/QueryUtils.html#QueryUtils()">QueryUtils</A></B>()</CODE>
118
119<BR>
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
121</TR>
122</TABLE>
123&nbsp;
124<!-- ========== METHOD SUMMARY =========== -->
125
126<A NAME="method_summary"><!-- --></A>
127<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
128<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
129<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
130<B>Method Summary</B></FONT></TH>
131</TR>
132<TR BGCOLOR="white" CLASS="TableRowColor">
133<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
134<CODE>static&nbsp;<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A></CODE></FONT></TD>
135<TD><CODE><B><A HREF="../../../../org/apache/solr/search/QueryUtils.html#fixNegativeQuery(org.apache.lucene.search.Query)">fixNegativeQuery</A></B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A>&nbsp;q)</CODE>
136
137<BR>
138&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fixes a negative query by adding a MatchAllDocs query clause.</TD>
139</TR>
140<TR BGCOLOR="white" CLASS="TableRowColor">
141<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142<CODE>static&nbsp;<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A></CODE></FONT></TD>
143<TD><CODE><B><A HREF="../../../../org/apache/solr/search/QueryUtils.html#getAbs(org.apache.lucene.search.Query)">getAbs</A></B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A>&nbsp;q)</CODE>
144
145<BR>
146&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the original query if it was already a positive query, otherwise
147 return the negative of the query (i.e., a positive query).</TD>
148</TR>
149<TR BGCOLOR="white" CLASS="TableRowColor">
150<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151<CODE>static&nbsp;boolean</CODE></FONT></TD>
152<TD><CODE><B><A HREF="../../../../org/apache/solr/search/QueryUtils.html#isNegative(org.apache.lucene.search.Query)">isNegative</A></B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A>&nbsp;q)</CODE>
153
154<BR>
155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return true if this query has no positive components</TD>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159<CODE>static&nbsp;<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A></CODE></FONT></TD>
160<TD><CODE><B><A HREF="../../../../org/apache/solr/search/QueryUtils.html#makeQueryable(org.apache.lucene.search.Query)">makeQueryable</A></B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A>&nbsp;q)</CODE>
161
162<BR>
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes negative queries suitable for querying by
164 lucene.</TD>
165</TR>
166</TABLE>
167&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
168<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
169<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
170<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
171</TR>
172<TR BGCOLOR="white" CLASS="TableRowColor">
173<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
174</TR>
175</TABLE>
176&nbsp;
177<P>
178
179<!-- ========= CONSTRUCTOR DETAIL ======== -->
180
181<A NAME="constructor_detail"><!-- --></A>
182<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
183<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
184<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
185<B>Constructor Detail</B></FONT></TH>
186</TR>
187</TABLE>
188
189<A NAME="QueryUtils()"><!-- --></A><H3>
190QueryUtils</H3>
191<PRE>
192public <B>QueryUtils</B>()</PRE>
193<DL>
194</DL>
195
196<!-- ============ METHOD DETAIL ========== -->
197
198<A NAME="method_detail"><!-- --></A>
199<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
200<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
201<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
202<B>Method Detail</B></FONT></TH>
203</TR>
204</TABLE>
205
206<A NAME="isNegative(org.apache.lucene.search.Query)"><!-- --></A><H3>
207isNegative</H3>
208<PRE>
209public static boolean <B>isNegative</B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A>&nbsp;q)</PRE>
210<DL>
211<DD>return true if this query has no positive components
212<P>
213<DD><DL>
214</DL>
215</DD>
216</DL>
217<HR>
218
219<A NAME="getAbs(org.apache.lucene.search.Query)"><!-- --></A><H3>
220getAbs</H3>
221<PRE>
222public static <A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A> <B>getAbs</B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A>&nbsp;q)</PRE>
223<DL>
224<DD>Returns the original query if it was already a positive query, otherwise
225 return the negative of the query (i.e., a positive query).
226 <p>
227 Example: both id:10 and id:-10 will return id:10
228 <p>
229 The caller can tell the sign of the original by a reference comparison between
230 the original and returned query.
231<P>
232<DD><DL>
233<DT><B>Parameters:</B><DD><CODE>q</CODE> - Query to create the absolute version of
234<DT><B>Returns:</B><DD>Absolute version of the Query</DL>
235</DD>
236</DL>
237<HR>
238
239<A NAME="makeQueryable(org.apache.lucene.search.Query)"><!-- --></A><H3>
240makeQueryable</H3>
241<PRE>
242public static <A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A> <B>makeQueryable</B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A>&nbsp;q)</PRE>
243<DL>
244<DD>Makes negative queries suitable for querying by
245 lucene.
246<P>
247<DD><DL>
248</DL>
249</DD>
250</DL>
251<HR>
252
253<A NAME="fixNegativeQuery(org.apache.lucene.search.Query)"><!-- --></A><H3>
254fixNegativeQuery</H3>
255<PRE>
256public static <A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A> <B>fixNegativeQuery</B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//core/org/apache/lucene/search/Query.html?is-external=true" title="class or interface in org.apache.lucene.search">Query</A>&nbsp;q)</PRE>
257<DL>
258<DD>Fixes a negative query by adding a MatchAllDocs query clause.
259 The query passed in *must* be a negative query.
260<P>
261<DD><DL>
262</DL>
263</DD>
264</DL>
265<!-- ========= END OF CLASS DATA ========= -->
266<HR>
267
268
269<!-- ======= START OF BOTTOM NAVBAR ====== -->
270<A NAME="navbar_bottom"><!-- --></A>
271<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
272<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
273<TR>
274<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
275<A NAME="navbar_bottom_firstrow"><!-- --></A>
276<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
277  <TR ALIGN="center" VALIGN="top">
278  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
279  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
280  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
281  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/QueryUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
282  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
283  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
284  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
285  </TR>
286</TABLE>
287</TD>
288<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
289</EM>
290</TD>
291</TR>
292
293<TR>
294<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
295&nbsp;<A HREF="../../../../org/apache/solr/search/QueryResultKey.html" title="class in org.apache.solr.search"><B>PREV CLASS</B></A>&nbsp;
296&nbsp;<A HREF="../../../../org/apache/solr/search/RawQParserPlugin.html" title="class in org.apache.solr.search"><B>NEXT CLASS</B></A></FONT></TD>
297<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
298  <A HREF="../../../../index.html?org/apache/solr/search/QueryUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
299&nbsp;<A HREF="QueryUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
300&nbsp;<SCRIPT type="text/javascript">
301  <!--
302  if(window==top) {
303    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
304  }
305  //-->
306</SCRIPT>
307<NOSCRIPT>
308  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
309</NOSCRIPT>
310
311
312</FONT></TD>
313</TR>
314<TR>
315<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
316  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
317<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
318DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
319</TR>
320</TABLE>
321<A NAME="skip-navbar_bottom"></A>
322<!-- ======== END OF BOTTOM NAVBAR ======= -->
323
324<HR>
325
326          <address>Copyright &copy; 2000-2012 Apache Software Foundation.  All Rights Reserved.</address>
327          <script src='../../../../prettify.js' type='text/javascript'></script>
328          <script type='text/javascript'>
329            (function(){
330              var oldonload = window.onload;
331              if (typeof oldonload != 'function') {
332                window.onload = prettyPrint;
333              } else {
334                window.onload = function() {
335                  oldonload();
336                  prettyPrint();
337                }
338              }
339            })();
340          </script>
341       
342</BODY>
343</HTML>
Note: See TracBrowser for help on using the repository browser.