no.sesat.search.mode.config
Class SolrCommandConfig

java.lang.Object
  extended by no.sesat.search.mode.config.CommandConfig
      extended by no.sesat.search.mode.config.SolrCommandConfig
All Implemented Interfaces:
Serializable, BaseSearchConfiguration, FacetedCommandConfig, SearchConfiguration, SearchConfiguration.ModesW3cDomDeserialiser

@CommandConfig.Controller(value="SolrSearchCommand")
public class SolrCommandConfig
extends CommandConfig
implements FacetedCommandConfig

Searching against a Solr index using the Solrj client.

Version:
$Id: SolrCommandConfig.java 7225 2009-04-09 00:32:20Z ssmiweve $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class no.sesat.search.mode.config.CommandConfig
CommandConfig.Controller
 
Nested classes/interfaces inherited from interface no.sesat.search.mode.config.SearchConfiguration
SearchConfiguration.ModesW3cDomDeserialiser
 
Field Summary
 
Fields inherited from class no.sesat.search.mode.config.CommandConfig
DEFAULT_DOCUMENTS_TO_RETURN
 
Fields inherited from interface no.sesat.search.mode.config.SearchConfiguration
DEFAULT_PAGING_PARAMETER, DEFAULT_USER_SORT_PARAMETER
 
Constructor Summary
SolrCommandConfig()
           
 
Method Summary
 void clearSort()
           
 Navigator getFacet(String navigatorKey)
           
 Map<String,Navigator> getFacets()
           
 String getFacetToolkit()
           
 String getFilteringQuery()
          The filter query.
 String getQueryType()
          Sets the qt parameter in turn choosing a query handler.
 String getServerUrl()
          Getter for property serverUrl.
 Map<String,String> getSortMap()
           
 int getTimeout()
           
 SearchConfiguration readSearchConfiguration(Element element, SearchConfiguration inherit, SearchModeFactory.Context context)
          Apply the attributes found in element to 'this'.
 void setFacetToolkit(String toolkit)
           
 void setFilteringQuery(String filteringQuery)
           
 void setQueryType(String queryType)
           
 void setServerUrl(String serverUrl)
           
 void setSort(String[] sortFields)
          Syntax: sort="fieldName1 asc, fieldName2 desc" Just "fieldName1" will presume ascending (asc) order.
 void setTimeout(Integer integer)
          Specified in milliseconds.
 
Methods inherited from class no.sesat.search.mode.config.CommandConfig
addQueryTransformer, addResultField, addResultFields, addResultHandler, clearFieldFilters, clearQueryTransformers, clearResultHandlers, getFieldFilterMap, getId, getInitialQueryTransformer, getName, getPagingParameter, getQueryBuilder, getQueryParameter, getQueryTransformers, getResultFieldMap, getResultFields, getResultHandlers, getResultsToReturn, getStatisticalName, getUserSortParameter, isAlwaysRun, isAsynchronous, isRunBlank, parseNavigators, setAlwaysRun, setAsynchronous, setFieldFilters, setId, setInitialQueryTransformer, setPagingParameter, setQueryBuilder, setQueryParameter, setResultsToReturn, setRunBlank, setStatisticalName, setUserSortParameter, toString, toStringLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface no.sesat.search.mode.config.SearchConfiguration
addResultField, clearFieldFilters, getFieldFilterMap, getId, getName, getPagingParameter, getQueryParameter, getResultFieldMap, getResultsToReturn, getStatisticalName, getUserSortParameter, isAlwaysRun, isAsynchronous, isRunBlank
 

Constructor Detail

SolrCommandConfig

public SolrCommandConfig()
Method Detail

getServerUrl

public String getServerUrl()
Getter for property serverUrl. The value returned is the key used to look up the real value via SiteConfiguration(via in configuration.properties)

Returns:
Value of property serverUrl.

setServerUrl

public void setServerUrl(String serverUrl)
Parameters:
serverUrl - New value of property serverUrl.
See Also:
getServerUrl()

getFilteringQuery

public String getFilteringQuery()
The filter query. Used like an additional filter to narrow the query down.

Returns:
See Also:
TODO change bean property from String to String[] to support multiple filtering queries.

setFilteringQuery

public void setFilteringQuery(String filteringQuery)
Parameters:
filteringQuery -
See Also:
getFilteringQuery()

getQueryType

public String getQueryType()
Sets the qt parameter in turn choosing a query handler. http://wiki.apache.org/solr/CoreQueryParameters

Returns:

setQueryType

public void setQueryType(String queryType)
Parameters:
filteringQuery -
See Also:
getQueryType()

getSortMap

public Map<String,String> getSortMap()
Returns:
Value of map property sort.
See Also:
CommandConfig.setFieldFilters(java.lang.String[])

clearSort

public void clearSort()

setSort

public void setSort(String[] sortFields)
Syntax: sort="fieldName1 asc, fieldName2 desc" Just "fieldName1" will presume ascending (asc) order.

Parameters:
sortFields - Array of sort fields.

setTimeout

public void setTimeout(Integer integer)
Specified in milliseconds. Default is Integer.MAX_VALUE. Only actived when root log4j logger is set to INFO or higher. Rationale here is that we don't want timeouts in debugging environments.

Parameters:
integer -

getTimeout

public int getTimeout()
Returns:
See Also:
setTimeout(java.lang.Integer)

getFacets

public Map<String,Navigator> getFacets()
Specified by:
getFacets in interface FacetedCommandConfig
Returns:

getFacet

public Navigator getFacet(String navigatorKey)
Specified by:
getFacet in interface FacetedCommandConfig
Parameters:
navigatorKey -
Returns:

getFacetToolkit

public String getFacetToolkit()

setFacetToolkit

public void setFacetToolkit(String toolkit)

readSearchConfiguration

public SearchConfiguration readSearchConfiguration(Element element,
                                                   SearchConfiguration inherit,
                                                   SearchModeFactory.Context context)
Description copied from interface: SearchConfiguration.ModesW3cDomDeserialiser
Apply the attributes found in element to 'this'. If some attributes are not found in element then try to fetch them from inherit and set them on 'this'.

Specified by:
readSearchConfiguration in interface SearchConfiguration.ModesW3cDomDeserialiser
Overrides:
readSearchConfiguration in class CommandConfig
Returns:
The newly read configuration (chaining pattern)


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.