Class SolrQueryHTTPClient
java.lang.Object
org.alfresco.repo.search.impl.solr.AbstractSolrQueryHTTPClient
org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient
- All Implemented Interfaces:
SolrQueryClient,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.InitializingBean
- Author:
- Andy
-
Field Summary
Fields inherited from class org.alfresco.repo.search.impl.solr.AbstractSolrQueryHTTPClient
DEFAULT_SAVEPOST_BUFFER, HIGHLIGHT_PARAMS_ALTERNATE_FIELD, HIGHLIGHT_PARAMS_ALTERNATE_FIELD_LENGTH, HIGHLIGHT_PARAMS_FIELD_MATCH, HIGHLIGHT_PARAMS_FIELDS, HIGHLIGHT_PARAMS_FORMATTER, HIGHLIGHT_PARAMS_FRAGMENTER, HIGHLIGHT_PARAMS_FRAGSIZE, HIGHLIGHT_PARAMS_HIGHLIGHT, HIGHLIGHT_PARAMS_HIGHLIGHT_MULTI_TERM, HIGHLIGHT_PARAMS_INCREMENT, HIGHLIGHT_PARAMS_MAX_CHARS, HIGHLIGHT_PARAMS_MAX_RE_CHARS, HIGHLIGHT_PARAMS_MERGE_CONTIGUOUS_FRAGMENTS, HIGHLIGHT_PARAMS_PATTERN, HIGHLIGHT_PARAMS_REGEX, HIGHLIGHT_PARAMS_SIMPLE, HIGHLIGHT_PARAMS_SIMPLE_POST, HIGHLIGHT_PARAMS_SIMPLE_PRE, HIGHLIGHT_PARAMS_SLOP, HIGHLIGHT_PARAMS_SNIPPETS, HIGHLIGHT_PARAMS_USE_PHRASE_HIGHLIGHTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidbuildFacetIntervalParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) protected voidbuildFacetParameters(SearchParameters searchParameters, boolean isSharded, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) protected voidbuildHightlightParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) protected voidbuildPivotParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) protected voidbuildRangeParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) protected voidbuildShards(StringBuilder url, List<StoreRef> storeRefs) protected org.json.JSONObjectbuildStatsBody(StatsParameters searchParameters, String tenant, Locale locale) protected voidbuildStatsParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) protected StringbuildStatsUrl(StatsParameters searchParameters, String baseUrl, Locale locale, SolrStoreMappingWrapper mapping) voidbuildUrlParameters(SearchParameters searchParameters, boolean isSharded, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) Builds most of the Url parameters for a Solr Http request.org.json.JSONObjectexecuteQuery(SearchParameters searchParameters, String language) executeStatsQuery(StatsParameters searchParameters) Executes a solr query for statisticsintintintvoidinit()booleanbooleanbooleanbooleanprotected SearchEngineResultMetadatapostSolrQuery(org.apache.commons.httpclient.HttpClient httpClient, String url, org.json.JSONObject body, SolrJsonProcessor<?> jsonProcessor) protected SearchEngineResultMetadatapostSolrQuery(org.apache.commons.httpclient.HttpClient httpClient, String url, org.json.JSONObject body, SolrJsonProcessor<?> jsonProcessor, String spellCheckParams) voidsetAlternativeDictionary(String alternativeDictionary) voidsetAnyDenyDenies(boolean anyDenyDenies) When set, a single DENIED ACL entry for any authority will result in access being denied as a whole.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) voidsetDefaultShardedFacetLimit(int defaultShardedFacetLimit) voidsetDefaultUnshardedFacetLimit(int defaultUnshardedFacetLimit) voidsetDictionaryService(DictionaryService dictionaryService) voidsetIncludeGroupsForRoleAdmin(boolean includeGroupsForRoleAdmin) voidsetLanguageMappings(Map<String, String> languageMappings) voidsetMaximumResultsFromUnlimitedQuery(int maximumResultsFromUnlimitedQuery) voidsetNamespaceDAO(NamespaceDAO namespaceDAO) voidsetNodeDAO(NodeDAO nodeDAO) voidsetNodeService(NodeService nodeService) voidsetPermissionService(PermissionService permissionService) voidsetRepositoryState(RepositoryState repositoryState) voidsetShardRegistry(ShardRegistry shardRegistry) voidsetStoreMappings(List storeMappings) voidsetTenantService(TenantService tenantService) voidsetUseDynamicShardRegistration(boolean useDynamicShardRegistration) Methods inherited from class org.alfresco.repo.search.impl.solr.AbstractSolrQueryHTTPClient
createNewPostMethod, postQuery
-
Constructor Details
-
SolrQueryHTTPClient
public SolrQueryHTTPClient()
-
-
Method Details
-
init
public void init() -
setAlternativeDictionary
-
setRepositoryState
- Parameters:
repositoryState- the repositoryState to set
-
setNodeService
-
setNodeDAO
- Parameters:
nodeDAO- the nodeDao to set
-
setPermissionService
-
setTenantService
-
setDictionaryService
-
setNamespaceDAO
-
setShardRegistry
-
setUseDynamicShardRegistration
public void setUseDynamicShardRegistration(boolean useDynamicShardRegistration) -
setLanguageMappings
-
setStoreMappings
-
setIncludeGroupsForRoleAdmin
public void setIncludeGroupsForRoleAdmin(boolean includeGroupsForRoleAdmin) - Parameters:
includeGroupsForRoleAdmin- the includeGroupsForRoleAdmin to set
-
setMaximumResultsFromUnlimitedQuery
public void setMaximumResultsFromUnlimitedQuery(int maximumResultsFromUnlimitedQuery) - Parameters:
maximumResultsFromUnlimitedQuery- the maximum number of results to request from an otherwise unlimited query
-
setAnyDenyDenies
public void setAnyDenyDenies(boolean anyDenyDenies) When set, a single DENIED ACL entry for any authority will result in access being denied as a whole. See system propertysecurity.anyDenyDenies- Parameters:
anyDenyDenies- boolean
-
setDefaultUnshardedFacetLimit
public void setDefaultUnshardedFacetLimit(int defaultUnshardedFacetLimit) - Parameters:
defaultUnshardedFacetLimit- the defaultUnshardedFacetLimit to set
-
setDefaultShardedFacetLimit
public void setDefaultShardedFacetLimit(int defaultShardedFacetLimit) - Parameters:
defaultShardedFacetLimit- the defaultShardedFacetLimit to set
-
executeStatsQuery
Executes a solr query for statistics- Specified by:
executeStatsQueryin interfaceSolrQueryClient- Parameters:
searchParameters- StatsParameters- Returns:
- SolrStatsResult
-
buildStatsUrl
protected String buildStatsUrl(StatsParameters searchParameters, String baseUrl, Locale locale, SolrStoreMappingWrapper mapping) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
buildShards
-
buildStatsBody
protected org.json.JSONObject buildStatsBody(StatsParameters searchParameters, String tenant, Locale locale) throws org.json.JSONException - Throws:
org.json.JSONException
-
executeQuery
- Specified by:
executeQueryin interfaceSolrQueryClient
-
buildUrlParameters
public void buildUrlParameters(SearchParameters searchParameters, boolean isSharded, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException Builds most of the Url parameters for a Solr Http request.- Parameters:
searchParameters-isSharded-encoder-url-- Throws:
UnsupportedEncodingException
-
buildFacetParameters
protected void buildFacetParameters(SearchParameters searchParameters, boolean isSharded, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
buildStatsParameters
protected void buildStatsParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
buildPivotParameters
protected void buildPivotParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
buildRangeParameters
protected void buildRangeParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
buildHightlightParameters
protected void buildHightlightParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
buildFacetIntervalParameters
protected void buildFacetIntervalParameters(SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
postSolrQuery
protected SearchEngineResultMetadata postSolrQuery(org.apache.commons.httpclient.HttpClient httpClient, String url, org.json.JSONObject body, SolrJsonProcessor<?> jsonProcessor) throws UnsupportedEncodingException, IOException, org.apache.commons.httpclient.HttpException, org.apache.commons.httpclient.URIException, org.json.JSONException - Throws:
UnsupportedEncodingExceptionIOExceptionorg.apache.commons.httpclient.HttpExceptionorg.apache.commons.httpclient.URIExceptionorg.json.JSONException
-
postSolrQuery
protected SearchEngineResultMetadata postSolrQuery(org.apache.commons.httpclient.HttpClient httpClient, String url, org.json.JSONObject body, SolrJsonProcessor<?> jsonProcessor, String spellCheckParams) throws UnsupportedEncodingException, IOException, org.apache.commons.httpclient.HttpException, org.apache.commons.httpclient.URIException, org.json.JSONException - Throws:
UnsupportedEncodingExceptionIOExceptionorg.apache.commons.httpclient.HttpExceptionorg.apache.commons.httpclient.URIExceptionorg.json.JSONException
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
execute
public org.json.JSONObject execute(StoreRef storeRef, String handler, HashMap<String, String> params) - Parameters:
storeRef-handler-params-- Returns:
-
isSharded
public boolean isSharded()- Specified by:
isShardedin interfaceSolrQueryClient- Returns:
-
getTenantService
-
getDictionaryService
-
getNodeService
-
getShardRegistry
-
getRepositoryState
-
isUseDynamicShardRegistration
public boolean isUseDynamicShardRegistration() -
getDefaultUnshardedFacetLimit
public int getDefaultUnshardedFacetLimit() -
getDefaultShardedFacetLimit
public int getDefaultShardedFacetLimit() -
getNamespaceDAO
-
getPermissionService
-
getLanguageMappings
-
isAnyDenyDenies
public boolean isAnyDenyDenies() -
getAlternativeDictionary
-
isIncludeGroupsForRoleAdmin
public boolean isIncludeGroupsForRoleAdmin() -
getMaximumResultsFromUnlimitedQuery
public int getMaximumResultsFromUnlimitedQuery()
-