public class RangeQueryFilter extends java.lang.Object implements AbstractQueryFilter
AbstractQueryFilter.QueryType
SOLR_AND, SOLR_OR
Constructor and Description |
---|
RangeQueryFilter(java.lang.String fieldName,
java.lang.Object from,
java.lang.Object to)
Both from and to can be of any object type, which can be converted to string using java.lang.String.valueOf()
|
Modifier and Type | Method and Description |
---|---|
AbstractQueryFilter.QueryType |
getQueryType() |
void |
toFilterString(java.lang.StringBuilder fq)
The appended contents should NOT contain the fq= parameter, and should contain ( ) when necessary to contain the query contents.
|
public RangeQueryFilter(java.lang.String fieldName, java.lang.Object from, java.lang.Object to) throws java.lang.IllegalArgumentException
fieldName
- solr field to target the search onfrom
- start range (inclusive), if null all values <= end will be returnedto
- end range clause (inclusive), if null all values >= start will be returnedjava.lang.IllegalArgumentException
- on bad field name, or if both from and to are nullpublic void toFilterString(java.lang.StringBuilder fq)
AbstractQueryFilter
toFilterString
in interface AbstractQueryFilter
fq
- append this query's contents to the given filter querypublic AbstractQueryFilter.QueryType getQueryType()
getQueryType
in interface AbstractQueryFilter
Copyright © 2015 Tampere University of Technology, Pori Department.