Class RewriteFacetParametersComponent

java.lang.Object
org.apache.solr.handler.component.SearchComponent
org.alfresco.solr.component.RewriteFacetParametersComponent
All Implemented Interfaces:
org.apache.solr.core.SolrInfoMBean, org.apache.solr.util.plugin.NamedListInitializedPlugin

public class RewriteFacetParametersComponent extends org.apache.solr.handler.component.SearchComponent
Update facet parameters to reference Solr fields rather than ACS properties.
Author:
Andy
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoMBean

    org.apache.solr.core.SolrInfoMBean.Category, org.apache.solr.core.SolrInfoMBean.Group
  • Field Summary

    Fields inherited from class org.apache.solr.handler.component.SearchComponent

    standard_components
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    static String[]
    Tokenizes a string based on comma's except for the ones in single or double qoutes.
    void
    prepare(org.apache.solr.handler.component.ResponseBuilder rb)
     
    void
    process(org.apache.solr.handler.component.ResponseBuilder rb)
     
    protected void
    rewriteMincountFacetFieldOption(org.apache.solr.common.params.ModifiableSolrParams fixed, org.apache.solr.common.params.SolrParams params, String paramName, Map<String,String> fieldMappings, org.apache.solr.request.SolrQueryRequest req)
    Ensure the mincount for all given facets is at least 1 to prevent exposing sensitive buckets to users without permission.

    Methods inherited from class org.apache.solr.handler.component.SearchComponent

    distributedProcess, finishStage, getCategory, getDocs, getName, getStatistics, getVersion, handleResponses, init, modifyRequest, setName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RewriteFacetParametersComponent

      public RewriteFacetParametersComponent()
  • Method Details

    • prepare

      public void prepare(org.apache.solr.handler.component.ResponseBuilder rb) throws IOException
      Specified by:
      prepare in class org.apache.solr.handler.component.SearchComponent
      Throws:
      IOException
    • rewriteMincountFacetFieldOption

      protected void rewriteMincountFacetFieldOption(org.apache.solr.common.params.ModifiableSolrParams fixed, org.apache.solr.common.params.SolrParams params, String paramName, Map<String,String> fieldMappings, org.apache.solr.request.SolrQueryRequest req)
      Ensure the mincount for all given facets is at least 1 to prevent exposing sensitive buckets to users without permission.
      Parameters:
      fixed - The updated params object.
      params - The original params object.
      paramName - The name of the mincount parameter to rewrite (e.g. "facet.mincount" or "facet.pivot.mincount").
      fieldMappings - A list of mappings from Alfresco property names to Solr field names.
      req - The Solr request
    • parseFacetField

      public static String[] parseFacetField(String line)
      Tokenizes a string based on comma's except for the ones in single or double qoutes.
      Parameters:
      line -
      Returns:
    • process

      public void process(org.apache.solr.handler.component.ResponseBuilder rb) throws IOException
      Specified by:
      process in class org.apache.solr.handler.component.SearchComponent
      Throws:
      IOException
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.apache.solr.core.SolrInfoMBean
      Specified by:
      getDescription in class org.apache.solr.handler.component.SearchComponent
    • getSource

      public String getSource()
      Specified by:
      getSource in interface org.apache.solr.core.SolrInfoMBean
      Overrides:
      getSource in class org.apache.solr.handler.component.SearchComponent