Package org.ametys.cms.search.solr
Class SolrContentQueryHelper
java.lang.Object
org.ametys.cms.search.solr.SolrContentQueryHelper
Helper to build Solr content queries.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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)getContentTypes
(Map<String, Object> jsParameters) Gets the content types from JS parameters when using 'search-ui.solr' model
-
Method Details
-
getContentTypes
Gets the content types from JS parameters when using 'search-ui.solr' model- Parameters:
jsParameters
- The JS parameters- Returns:
- The content types
-
buildQuery
public static String buildQuery(QueryBuilder queryBuilder, String baseQuery, Set<String> contentTypesOrMixins, Set<Integer> wfSteps) throws QuerySyntaxException Build a Solr query string from inputs coming from a SolrQuerySearch (query, content types, workflow steps)- Parameters:
queryBuilder
- TheQueryBuilder
componentbaseQuery
- The main querycontentTypesOrMixins
- The content types -or mixins- (can be empty)wfSteps
- The workflow steps (can be empty)- Returns:
- The built query
- Throws:
QuerySyntaxException
- If a query syntax is invalid
-