public abstract class AbstractSolrSearchServiceExtensionHandler extends AbstractExtensionHandler implements SolrSearchServiceExtensionHandler
enabled, priority| Constructor and Description |
|---|
AbstractSolrSearchServiceExtensionHandler() |
| Modifier and Type | Method and Description |
|---|---|
ExtensionResultStatusType |
attachFacet(org.apache.solr.client.solrj.SolrQuery query,
String indexField,
SearchFacetDTO dto)
Deprecated.
|
ExtensionResultStatusType |
attachFacet(org.apache.solr.client.solrj.SolrQuery query,
String indexField,
SearchFacetDTO dto,
SearchCriteria searchCriteria)
Attaches the given dto to the given query, if possible
|
ExtensionResultStatusType |
buildActiveFacetFilter(FieldEntity entityType,
String solrKey,
String[] selectedValues,
List<String> valueStrings)
Builds the active facet filter query string for the given entity type and values.
|
ExtensionResultStatusType |
buildPrefixListForIndexField(IndexField field,
FieldType fieldType,
List<String> prefixList)
Returns a prefix if required for the passed in searchable field.
|
ExtensionResultStatusType |
filterSearchFacetRanges(SearchFacetDTO dto,
List<SearchFacetRange> ranges)
Builds the search facet ranges for the provided dto.
|
ExtensionResultStatusType |
getQueryField(org.apache.solr.client.solrj.SolrQuery query,
SearchCriteria searchCriteria,
IndexFieldType indexFieldType,
ExtensionResultHolder<List<String>> queryFieldsResult)
Finds and adds the query fields for the given search field and searchable field type.
|
ExtensionResultStatusType |
getSearchableIndexFields(List<IndexField> fields)
Populated the List of searchable IndexField's that will be used in building the query fields (qf) for a Solr query.
|
ExtensionResultStatusType |
getSearchFacets(List<SearchFacet> searchFacets)
Populates the List of SearchFacet's, or else returns NOT_HANDLED
|
ExtensionResultStatusType |
modifySearchResults(List<org.apache.solr.common.SolrDocument> responseDocuments,
List<SearchResultItem> items)
Modifies the product search results from a Solr query
|
ExtensionResultStatusType |
modifySolrQuery(SearchContextDTO context,
org.apache.solr.client.solrj.SolrQuery query,
String qualifiedSolrQuery,
List<SearchFacetDTO> facets,
SearchCriteria searchCriteria)
Provides an extension point to modify the SolrQuery.
|
ExtensionResultStatusType |
modifySolrQuery(org.apache.solr.client.solrj.SolrQuery query,
String qualifiedSolrQuery,
List<SearchFacetDTO> facets,
SearchCriteria searchCriteria)
Provides an extension point to modify the SolrQuery.
|
ExtensionResultStatusType |
setFacetResults(Map<String,SearchFacetDTO> namedFacetMap,
org.apache.solr.client.solrj.response.QueryResponse response)
Attaches any additional facet results to the namedFacetMap if they exist.
|
getPriority, isEnabled, setEnabled, setPriorityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPriority, isEnabledpublic AbstractSolrSearchServiceExtensionHandler()
public ExtensionResultStatusType buildPrefixListForIndexField(IndexField field, FieldType fieldType, List<String> prefixList)
SolrSearchServiceExtensionHandlerbuildPrefixListForIndexField in interface SolrSearchServiceExtensionHandlerpublic ExtensionResultStatusType filterSearchFacetRanges(SearchFacetDTO dto, List<SearchFacetRange> ranges)
SolrSearchServiceExtensionHandlerfilterSearchFacetRanges in interface SolrSearchServiceExtensionHandlerpublic ExtensionResultStatusType modifySolrQuery(org.apache.solr.client.solrj.SolrQuery query, String qualifiedSolrQuery, List<SearchFacetDTO> facets, SearchCriteria searchCriteria)
SolrSearchServiceExtensionHandlermodifySolrQuery in interface SolrSearchServiceExtensionHandlerpublic ExtensionResultStatusType modifySolrQuery(SearchContextDTO context, org.apache.solr.client.solrj.SolrQuery query, String qualifiedSolrQuery, List<SearchFacetDTO> facets, SearchCriteria searchCriteria)
SolrSearchServiceExtensionHandlermodifySolrQuery in interface SolrSearchServiceExtensionHandlerpublic ExtensionResultStatusType getQueryField(org.apache.solr.client.solrj.SolrQuery query, SearchCriteria searchCriteria, IndexFieldType indexFieldType, ExtensionResultHolder<List<String>> queryFieldsResult)
SolrSearchServiceExtensionHandlerFinds and adds the query fields for the given search field and searchable field type. This method should only ADD to the list within the queryFieldsResult parameters.
Most implementations of this will need to invoke SolrHelperService.getPropertyNameForIndexField(IndexField, FieldType)
in order to return the right value to populate in the queryFieldsResult. If the returned result is
ExtensionResultStatusType.NOT_HANDLED then the default behavior is to only do that.
getQueryField in interface SolrSearchServiceExtensionHandlerindexFieldType - the field type of the fieldqueryFieldsResult - the binding result that contains the list of query fields, only add to this @return the result of the handler, if NOT_HANDLED, then no query fields were addedSolrHelperService#getPropertyNameForIndexField(IndexField, FieldType)}public ExtensionResultStatusType modifySearchResults(List<org.apache.solr.common.SolrDocument> responseDocuments, List<SearchResultItem> items)
SolrSearchServiceExtensionHandlerModifies the product search results from a Solr query
The parameters passed into this method should be assumed to be sorted identically and match one to one.
modifySearchResults in interface SolrSearchServiceExtensionHandlerresponseDocuments - the response documents from Solrpublic ExtensionResultStatusType getSearchFacets(List<SearchFacet> searchFacets)
SolrSearchServiceExtensionHandlergetSearchFacets in interface SolrSearchServiceExtensionHandlersearchFacets - the List to populate@Deprecated public ExtensionResultStatusType attachFacet(org.apache.solr.client.solrj.SolrQuery query, String indexField, SearchFacetDTO dto)
attachFacet(SolrQuery, String, SearchFacetDTO, SearchCriteria)SolrSearchServiceExtensionHandlerattachFacet in interface SolrSearchServiceExtensionHandlerquery - the SolrQuery to attach the facet topublic ExtensionResultStatusType attachFacet(org.apache.solr.client.solrj.SolrQuery query, String indexField, SearchFacetDTO dto, SearchCriteria searchCriteria)
SolrSearchServiceExtensionHandlerattachFacet in interface SolrSearchServiceExtensionHandlerquery - the SolrQuery to attach the facet topublic ExtensionResultStatusType setFacetResults(Map<String,SearchFacetDTO> namedFacetMap, org.apache.solr.client.solrj.response.QueryResponse response)
SolrSearchServiceExtensionHandlersetFacetResults in interface SolrSearchServiceExtensionHandlerpublic ExtensionResultStatusType buildActiveFacetFilter(FieldEntity entityType, String solrKey, String[] selectedValues, List<String> valueStrings)
SolrSearchServiceExtensionHandlerbuildActiveFacetFilter in interface SolrSearchServiceExtensionHandlerpublic ExtensionResultStatusType getSearchableIndexFields(List<IndexField> fields)
SolrSearchServiceExtensionHandlergetSearchableIndexFields in interface SolrSearchServiceExtensionHandlerfields - the List to be populated.Copyright © 2017. All rights reserved.