Class SolrContentQueryHelper

java.lang.Object
org.ametys.cms.search.solr.SolrContentQueryHelper

public final class SolrContentQueryHelper extends Object
Helper to build Solr content queries.
  • Method Details

    • 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 - The QueryBuilder component
      baseQuery - The main query
      contentTypesOrMixins - 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