Package org.ametys.cms.search.solr
Class SolrContentQueryHelper
- java.lang.Object
-
- org.ametys.cms.search.solr.SolrContentQueryHelper
-
public final class SolrContentQueryHelper extends Object
Helper to build Solr content queries.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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)static Set<String>
getContentTypes(Map<String,Object> jsParameters)
Gets the content types from JS parameters when using 'search-ui.solr' model
-
-
-
Method Detail
-
getContentTypes
public static Set<String> getContentTypes(Map<String,Object> jsParameters)
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
-
-