|
Spring Data Solr | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.solr.core.QueryParserBase<QUERYTPYE>
public abstract class QueryParserBase<QUERYTPYE extends SolrDataQuery>
Base Implementation of QueryParser providing common functions for creating
SolrQuery.
| Nested Class Summary | |
|---|---|
static interface |
QueryParserBase.CriteriaEntryProcessor
CriteriaEntryProcessor creates a solr reable query string representation for a given Criteria.CriteriaEntry |
| Field Summary | |
|---|---|
protected static String |
BOOST
|
protected GenericConversionService |
conversionService
|
protected static String |
CRITERIA_VALUE_SEPERATOR
|
protected static String |
DELIMINATOR
|
protected static String |
NOT
|
| Constructor Summary | |
|---|---|
QueryParserBase()
|
|
| Method Summary | |
|---|---|
void |
addCriteriaEntryProcessor(QueryParserBase.CriteriaEntryProcessor processor)
add another QueryParserBase.CriteriaEntryProcessor |
protected void |
appendDefaultOperator(org.apache.solr.client.solrj.SolrQuery solrQuery,
Query.Operator defaultOperator)
Set q.op parameter for SolrQuery |
protected void |
appendDefType(org.apache.solr.client.solrj.SolrQuery solrQuery,
String defType)
Set defType for SolrQuery |
protected void |
appendPagination(org.apache.solr.client.solrj.SolrQuery query,
Pageable pageable)
Append pagination information start, rows to SolrQuery |
protected void |
appendProjectionOnFields(org.apache.solr.client.solrj.SolrQuery solrQuery,
List<Field> fields)
Append field list to SolrQuery |
protected void |
appendRequestHandler(org.apache.solr.client.solrj.SolrQuery solrQuery,
String requestHandler)
Set request handler parameter for SolrQuery |
protected void |
appendTimeAllowed(org.apache.solr.client.solrj.SolrQuery solrQuery,
Integer timeAllowed)
Set SolrQuery.setTimeAllowed(Integer) |
org.apache.solr.client.solrj.SolrQuery |
constructSolrQuery(SolrDataQuery query)
Convert given Query into a SolrQuery executable via SolrServer |
protected String |
createCalculatedFieldFragment(CalculatedField calculatedField)
Create SolrServer readable String representation for CalculatedField. |
protected String |
createFunctionFragment(Function function)
Create SolrServer readable String representation for Function |
protected String |
createQueryFragmentForCriteria(Criteria criteria)
Creates query string representation of a single critiera |
protected String |
createQueryStringFromCriteria(Criteria criteria)
Iterates criteria list and concats query string fragments to form a valid query string to be used with SolrQuery.setQuery(String) |
abstract org.apache.solr.client.solrj.SolrQuery |
doConstructSolrQuery(QUERYTPYE query)
|
String |
getQueryString(SolrDataQuery query)
Get the queryString to use withSolrQuery.setParam(CommonParams.Q, "queryString"} |
protected String |
prependJoin(String queryString,
SolrDataQuery query)
Prepend {@code ! |
void |
registerConverter(Converter<?,?> converter)
Register an additional converter for transforming object values to solr readable format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String CRITERIA_VALUE_SEPERATOR
protected static final String DELIMINATOR
protected static final String NOT
protected static final String BOOST
protected final GenericConversionService conversionService
| Constructor Detail |
|---|
public QueryParserBase()
| Method Detail |
|---|
public String getQueryString(SolrDataQuery query)
QueryParser
getQueryString in interface QueryParserpublic void registerConverter(Converter<?,?> converter)
QueryParser
registerConverter in interface QueryParserpublic void addCriteriaEntryProcessor(QueryParserBase.CriteriaEntryProcessor processor)
QueryParserBase.CriteriaEntryProcessor
processor - protected String createQueryStringFromCriteria(Criteria criteria)
SolrQuery.setQuery(String)
criteria -
protected String createQueryFragmentForCriteria(Criteria criteria)
criteria -
protected String createCalculatedFieldFragment(CalculatedField calculatedField)
SolrServer readable String representation for CalculatedField.
calculatedField -
protected String createFunctionFragment(Function function)
SolrServer readable String representation for Function
function -
protected String prependJoin(String queryString,
SolrDataQuery query)
!join from= to= to given queryString
queryString - query -
protected void appendPagination(org.apache.solr.client.solrj.SolrQuery query,
Pageable pageable)
start, rows to SolrQuery
query - pageable -
protected void appendProjectionOnFields(org.apache.solr.client.solrj.SolrQuery solrQuery,
List<Field> fields)
SolrQuery
solrQuery - fields -
protected void appendDefaultOperator(org.apache.solr.client.solrj.SolrQuery solrQuery,
Query.Operator defaultOperator)
q.op parameter for SolrQuery
solrQuery - defaultOperator -
protected void appendTimeAllowed(org.apache.solr.client.solrj.SolrQuery solrQuery,
Integer timeAllowed)
SolrQuery.setTimeAllowed(Integer)
solrQuery - timeAllowed -
protected void appendDefType(org.apache.solr.client.solrj.SolrQuery solrQuery,
String defType)
defType for SolrQuery
solrQuery - defType -
protected void appendRequestHandler(org.apache.solr.client.solrj.SolrQuery solrQuery,
String requestHandler)
SolrQuery
solrQuery - requestHandler - public org.apache.solr.client.solrj.SolrQuery constructSolrQuery(SolrDataQuery query)
QueryParserSolrServer
constructSolrQuery in interface QueryParserpublic abstract org.apache.solr.client.solrj.SolrQuery doConstructSolrQuery(QUERYTPYE query)
|
Spring Data Solr | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||