public class Queries extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.apache.lucene.search.Filter |
MATCH_ALL_FILTER
A match all docs filter.
|
static org.apache.lucene.search.Filter |
MATCH_NO_FILTER |
| Constructor and Description |
|---|
Queries() |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyMinimumShouldMatch(org.apache.lucene.search.BooleanQuery query,
String minimumShouldMatch) |
static int |
calculateMinShouldMatch(int optionalClauseCount,
String spec) |
static org.apache.lucene.search.Query |
fixNegativeQueryIfNeeded(org.apache.lucene.search.Query q) |
static boolean |
isConstantMatchAllQuery(org.apache.lucene.search.Query query) |
static boolean |
isNegativeQuery(org.apache.lucene.search.Query q) |
static org.apache.lucene.search.Query |
newMatchAllQuery() |
static org.apache.lucene.search.Query |
newMatchNoDocsQuery()
Return a query that matches no document.
|
static org.apache.lucene.search.Filter |
wrap(org.apache.lucene.search.Query query,
QueryParseContext context)
Wraps a query in a filter.
|
public static final org.apache.lucene.search.Filter MATCH_ALL_FILTER
public static final org.apache.lucene.search.Filter MATCH_NO_FILTER
public static org.apache.lucene.search.Query newMatchAllQuery()
public static org.apache.lucene.search.Query newMatchNoDocsQuery()
public static boolean isNegativeQuery(org.apache.lucene.search.Query q)
public static org.apache.lucene.search.Query fixNegativeQueryIfNeeded(org.apache.lucene.search.Query q)
public static boolean isConstantMatchAllQuery(org.apache.lucene.search.Query query)
public static void applyMinimumShouldMatch(org.apache.lucene.search.BooleanQuery query,
@Nullable
String minimumShouldMatch)
public static int calculateMinShouldMatch(int optionalClauseCount,
String spec)
public static org.apache.lucene.search.Filter wrap(org.apache.lucene.search.Query query,
QueryParseContext context)
CustomQueryWrappingFilter is returned
otherwise the standard QueryWrapperFilter is returned.Copyright © 2009–2016. All rights reserved.