com.mysema.query.lucene
Class LuceneSerializer
java.lang.Object
com.mysema.query.lucene.LuceneSerializer
- Direct Known Subclasses:
- SearchSerializer
public class LuceneSerializer
- extends Object
Serializes Querydsl queries to Lucene queries.
- Author:
- vema
Method Summary |
protected org.apache.lucene.search.Query |
between(Operation<?> operation,
QueryMetadata metadata)
|
protected String[] |
convert(Path<?> leftHandSide,
Expression<?> rightHandSide,
QueryMetadata metadata)
template method |
protected String[] |
convert(Path<?> leftHandSide,
Object rightHandSide)
template method |
protected org.apache.lucene.search.Query |
endsWith(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
|
protected org.apache.lucene.search.Query |
eq(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
|
protected org.apache.lucene.search.Query |
eq(String field,
String[] terms,
boolean ignoreCase)
|
protected org.apache.lucene.search.Query |
ge(Operation<?> operation,
QueryMetadata metadata)
|
protected org.apache.lucene.search.Query |
gt(Operation<?> operation,
QueryMetadata metadata)
|
protected org.apache.lucene.search.Query |
in(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
|
protected org.apache.lucene.search.Query |
le(Operation<?> operation,
QueryMetadata metadata)
|
protected org.apache.lucene.search.Query |
like(Operation<?> operation,
QueryMetadata metadata)
|
protected org.apache.lucene.search.Query |
lt(Operation<?> operation,
QueryMetadata metadata)
|
protected org.apache.lucene.search.Query |
ne(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
|
protected
<N extends Number>
org.apache.lucene.search.NumericRangeQuery<?> |
|
numericRange(Class<N> clazz,
String field,
N min,
N max,
boolean minInc,
boolean maxInc)
|
protected org.apache.lucene.search.Query |
range(Path<?> leftHandSide,
String field,
Expression<?> min,
Expression<?> max,
boolean minInc,
boolean maxInc,
QueryMetadata metadata)
|
protected org.apache.lucene.search.Query |
startsWith(QueryMetadata metadata,
Operation<?> operation,
boolean ignoreCase)
|
protected org.apache.lucene.search.Query |
stringContains(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
|
protected org.apache.lucene.search.Query |
stringRange(Path<?> leftHandSide,
String field,
Expression<?> min,
Expression<?> max,
boolean minInc,
boolean maxInc,
QueryMetadata metadata)
|
protected String |
toField(Path<?> path)
template method, override to customize |
org.apache.lucene.search.Query |
toQuery(Expression<?> expr,
QueryMetadata metadata)
|
org.apache.lucene.search.Sort |
toSort(List<? extends OrderSpecifier<?>> orderBys)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT
public static final LuceneSerializer DEFAULT
LuceneSerializer
public LuceneSerializer(boolean lowerCase,
boolean splitTerms)
LuceneSerializer
public LuceneSerializer(boolean lowerCase,
boolean splitTerms,
Locale sortLocale)
like
protected org.apache.lucene.search.Query like(Operation<?> operation,
QueryMetadata metadata)
eq
protected org.apache.lucene.search.Query eq(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
eq
protected org.apache.lucene.search.Query eq(String field,
String[] terms,
boolean ignoreCase)
in
protected org.apache.lucene.search.Query in(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
ne
protected org.apache.lucene.search.Query ne(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
startsWith
protected org.apache.lucene.search.Query startsWith(QueryMetadata metadata,
Operation<?> operation,
boolean ignoreCase)
stringContains
protected org.apache.lucene.search.Query stringContains(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
endsWith
protected org.apache.lucene.search.Query endsWith(Operation<?> operation,
QueryMetadata metadata,
boolean ignoreCase)
between
protected org.apache.lucene.search.Query between(Operation<?> operation,
QueryMetadata metadata)
lt
protected org.apache.lucene.search.Query lt(Operation<?> operation,
QueryMetadata metadata)
gt
protected org.apache.lucene.search.Query gt(Operation<?> operation,
QueryMetadata metadata)
le
protected org.apache.lucene.search.Query le(Operation<?> operation,
QueryMetadata metadata)
ge
protected org.apache.lucene.search.Query ge(Operation<?> operation,
QueryMetadata metadata)
range
protected org.apache.lucene.search.Query range(Path<?> leftHandSide,
String field,
@Nullable
Expression<?> min,
@Nullable
Expression<?> max,
boolean minInc,
boolean maxInc,
QueryMetadata metadata)
numericRange
protected <N extends Number> org.apache.lucene.search.NumericRangeQuery<?> numericRange(Class<N> clazz,
String field,
@Nullable
N min,
@Nullable
N max,
boolean minInc,
boolean maxInc)
stringRange
protected org.apache.lucene.search.Query stringRange(Path<?> leftHandSide,
String field,
@Nullable
Expression<?> min,
@Nullable
Expression<?> max,
boolean minInc,
boolean maxInc,
QueryMetadata metadata)
toField
protected String toField(Path<?> path)
- template method, override to customize
- Parameters:
path
-
- Returns:
convert
protected String[] convert(Path<?> leftHandSide,
Expression<?> rightHandSide,
QueryMetadata metadata)
- template method
- Parameters:
leftHandSide
- rightHandSide
-
- Returns:
convert
protected String[] convert(Path<?> leftHandSide,
Object rightHandSide)
- template method
- Parameters:
leftHandSide
- rightHandSide
-
- Returns:
toQuery
public org.apache.lucene.search.Query toQuery(Expression<?> expr,
QueryMetadata metadata)
toSort
public org.apache.lucene.search.Sort toSort(List<? extends OrderSpecifier<?>> orderBys)
Copyright © 2007-2012 Mysema Ltd. All Rights Reserved.