|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.search.QueryUtils
public class QueryUtils
Constructor Summary | |
---|---|
QueryUtils()
|
Method Summary | |
---|---|
static org.apache.lucene.search.Query |
fixNegativeQuery(org.apache.lucene.search.Query q)
Fixes a negative query by adding a MatchAllDocs query clause. |
static org.apache.lucene.search.Query |
getAbs(org.apache.lucene.search.Query q)
Returns the original query if it was already a positive query, otherwise return the negative of the query (i.e., a positive query). |
static boolean |
isNegative(org.apache.lucene.search.Query q)
return true if this query has no positive components |
static org.apache.lucene.search.Query |
makeQueryable(org.apache.lucene.search.Query q)
Makes negative queries suitable for querying by lucene. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryUtils()
Method Detail |
---|
public static boolean isNegative(org.apache.lucene.search.Query q)
public static org.apache.lucene.search.Query getAbs(org.apache.lucene.search.Query q)
Example: both id:10 and id:-10 will return id:10
The caller can tell the sign of the original by a reference comparison between the original and returned query.
q
- Query to create the absolute version of
public static org.apache.lucene.search.Query makeQueryable(org.apache.lucene.search.Query q)
public static org.apache.lucene.search.Query fixNegativeQuery(org.apache.lucene.search.Query q)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |