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
-
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
FieldsModifier and TypeFieldDescriptionprotected List<org.apache.solr.handler.component.SearchComponent>static final Stringstatic final StringFacet SOLR Queries are omitting facet results with count equals to 0 as general rule.Fields inherited from class org.apache.solr.handler.RequestHandlerBase
appends, defaults, httpCaching, initArgs, invariantsFields inherited from interface org.apache.solr.request.SolrRequestHandler
TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.solr.handler.component.SearchComponent>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) final 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, setPluginInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.api.ApiSupport
registerV1, registerV2
-
Field Details
-
components
-
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:
-
FACET_CONTEXT_KEY
- See Also:
-
-
Constructor Details
-
AlfrescoSearchHandler
public AlfrescoSearchHandler()
-
-
Method Details
-
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
-
handleRequestBody
public void handleRequestBody(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.response.SolrQueryResponse rsp) throws Exception - Specified by:
handleRequestBodyin classorg.apache.solr.handler.RequestHandlerBase- Throws:
Exception
-
removeFacetQueriesWithCountZero
public static void removeFacetQueriesWithCountZero(org.apache.solr.response.SolrQueryResponse rsp) -
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)
-