public class SolrQuerySearchAction extends SearchAction
| Modifier and Type | Field and Description |
|---|---|
protected ColumnHelper |
_columnHelper
The helper for columns
|
protected ContentTypesHelper |
_contentTypesHelper
The content types helper.
|
_contentTypeExtensionPoint, _context, _getQueryFromJSONHelper, _queryBuilder, _searcherFactory, _searchModelManager, _serverCommHelper, QUERY_ERROR, SEARCH_CONTENTS, SEARCH_LOCALE, SEARCH_MODEL, SEARCH_RESULTSmanagerEMPTY_MAP| Constructor and Description |
|---|
SolrQuerySearchAction() |
| Modifier and Type | Method and Description |
|---|---|
private Collection<ColumnHelper.Column> |
_getColumns(String columnsStr,
String baseContentType) |
static String |
buildQuery(QueryBuilder queryBuilder,
String baseQuery,
Set<String> contentTypesOrMixins,
Set<Integer> wfSteps)
Build a Solr query string from inputs coming from a SolrQuerySearch (query, content types, workflow steps)
|
protected void |
doSearch(Request request,
SearchUIModel model,
int offset,
int maxResults,
Map<String,Object> jsParameters,
Map<String,Object> contextualParameters)
Do the search and set the results in request attributes.
|
static Set<String> |
getContentTypes(Map<String,Object> jsParameters)
Gets the content types from JS parameters when using 'search-ui.solr' model
|
void |
service(ServiceManager serviceManager)
The searcher
|
act, contextualize, getMaxResults, getOffset, getSearchUIModel, getSortenableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected ContentTypesHelper _contentTypesHelper
protected ColumnHelper _columnHelper
public SolrQuerySearchAction()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface Serviceableservice in class SearchActionServiceExceptionprotected void doSearch(Request request, SearchUIModel model, int offset, int maxResults, Map<String,Object> jsParameters, Map<String,Object> contextualParameters) throws Exception
SearchActiondoSearch in class SearchActionrequest - The request. The results or contents' id have to be set in request attributesmodel - The search UI modeloffset - The index of searchmaxResults - The max resultsjsParameters - The JS parameterscontextualParameters - The contextual parametersException - if the search failedprivate Collection<ColumnHelper.Column> _getColumns(String columnsStr, String baseContentType)
public static Set<String> getContentTypes(Map<String,Object> jsParameters)
jsParameters - The JS parameterspublic static String buildQuery(QueryBuilder queryBuilder, String baseQuery, Set<String> contentTypesOrMixins, Set<Integer> wfSteps) throws QuerySyntaxException
queryBuilder - The QueryBuilder componentbaseQuery - The main querycontentTypesOrMixins - The content types -or mixins- (can be empty)wfSteps - The workflow steps (can be empty)QuerySyntaxException - If a query syntax is invalid