Class AlfrescoSearchHandler
- java.lang.Object
-
- org.apache.solr.handler.RequestHandlerBase
-
- org.apache.solr.handler.component.AlfrescoSearchHandler
-
- All Implemented Interfaces:
org.apache.solr.api.ApiSupport,org.apache.solr.core.SolrInfoMBean,org.apache.solr.handler.NestedRequestHandler,org.apache.solr.metrics.SolrMetricProducer,org.apache.solr.request.SolrRequestHandler,org.apache.solr.util.plugin.PluginInfoInitialized,org.apache.solr.util.plugin.SolrCoreAware
public class AlfrescoSearchHandler extends org.apache.solr.handler.RequestHandlerBase implements org.apache.solr.util.plugin.SolrCoreAware, org.apache.solr.util.plugin.PluginInfoInitialized- Author:
- Andy
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<org.apache.solr.handler.component.SearchComponent>componentsstatic java.lang.StringFACET_CONTEXT_KEYstatic java.lang.StringFACET_COUNTS_KEYFacet SOLR Queries are omitting facet results with count equals to 0 as general rule.
-
Constructor Summary
Constructors Constructor Description AlfrescoSearchHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<org.apache.solr.handler.component.SearchComponent>getComponents()protected java.util.List<java.lang.String>getDefaultComponents()java.lang.StringgetDescription()voidhandleRequestBody(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp)voidinform(org.apache.solr.core.SolrCore core)Initialize the components based on name.voidinit(org.apache.solr.core.PluginInfo info)static voidremoveFacetQueriesWithCountZero(org.apache.solr.response.SolrQueryResponse rsp)org.apache.solr.common.SolrDocumenttoSolrDocument(org.apache.lucene.document.Document doc, org.apache.solr.schema.IndexSchema schema)-
Methods inherited from class org.apache.solr.handler.RequestHandlerBase
getApis, getCategory, getDocs, getInitArgs, getName, getPluginInfo, getRequestHandler, getSolrParamsFromNamedList, getSource, getStatistics, getSubHandler, getVersion, handleRequest, init, initializeMetrics, setPluginInfo
-
-
-
-
Field Detail
-
components
protected volatile java.util.List<org.apache.solr.handler.component.SearchComponent> components
-
FACET_COUNTS_KEY
public static final java.lang.String FACET_COUNTS_KEY
Facet SOLR Queries are omitting facet results with count equals to 0 as general rule. SOLR Queries executed on a Shard environment, don't include these results but the same query executed on a single server environment are adding these elements to the response. This method removes every facet query having count equals to 0 to provide the same behaviour in both cases. A query like the following, will return only Facet Queries having elements: "facetQueries" : [ { "query" : "content.size:[0 TO 102400]", "label" : "small"}, { "query" : "content.size:[102400 TO 1048576]", "label" : "medium"}, { "query" : "content.size:[1048576 TO 16777216]", "label" : "large"} ] For instance, if there are only results with "small" key, the result will be: "facetQueries": [ { "label": "small", "filterQuery": "content.size:[0 TO 102400]", "count": 5 } ]- See Also:
- Constant Field Values
-
FACET_CONTEXT_KEY
public static final java.lang.String FACET_CONTEXT_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultComponents
protected java.util.List<java.lang.String> getDefaultComponents()
-
init
public void init(org.apache.solr.core.PluginInfo info)
- Specified by:
initin interfaceorg.apache.solr.util.plugin.PluginInfoInitialized
-
inform
public void inform(org.apache.solr.core.SolrCore core)
Initialize the components based on name. Note, if usingINIT_FIRST_COMPONENTSorINIT_LAST_COMPONENTS, then theDebugComponentwill always occur last. If this is not desired, then one must explicitly declare all components using theINIT_COMPONENTSsyntax.- Specified by:
informin interfaceorg.apache.solr.util.plugin.SolrCoreAware
-
getComponents
public java.util.List<org.apache.solr.handler.component.SearchComponent> getComponents()
-
handleRequestBody
public void handleRequestBody(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp) throws java.lang.Exception- Specified by:
handleRequestBodyin classorg.apache.solr.handler.RequestHandlerBase- Throws:
java.lang.Exception
-
removeFacetQueriesWithCountZero
public static void removeFacetQueriesWithCountZero(org.apache.solr.response.SolrQueryResponse rsp)
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceorg.apache.solr.core.SolrInfoMBean- Specified by:
getDescriptionin classorg.apache.solr.handler.RequestHandlerBase
-
toSolrDocument
public final org.apache.solr.common.SolrDocument toSolrDocument(org.apache.lucene.document.Document doc, org.apache.solr.schema.IndexSchema schema)
-
-