no.sesat.search.mode.command
Class SolrSearchCommand

java.lang.Object
  extended by no.sesat.search.mode.command.AbstractSearchCommand
      extended by no.sesat.search.mode.command.SolrSearchCommand
All Implemented Interfaces:
Serializable, Callable<ResultList<ResultItem>>, SearchCommand

public class SolrSearchCommand
extends AbstractSearchCommand

Searching against a Solr index using the Solrj client. see http://wiki.apache.org/solr/Solrj The query syntax could be improved see http://lucene.apache.org/java/docs/queryparsersyntax.html

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

Nested Class Summary
static interface SolrSearchCommand.FacetToolkit
          Provider to add facets from request to SolrQuery.
protected static class SolrSearchCommand.FacetToolkitFactory
           
 
Nested classes/interfaces inherited from class no.sesat.search.mode.command.AbstractSearchCommand
AbstractSearchCommand.QueryBuilderFactory, AbstractSearchCommand.ReconstructedQuery
 
Nested classes/interfaces inherited from interface no.sesat.search.mode.command.SearchCommand
SearchCommand.Context
 
Field Summary
 
Fields inherited from class no.sesat.search.mode.command.AbstractSearchCommand
completed, context, datamodel, datamodelParameters, DUMP, untransformedQuery
 
Constructor Summary
SolrSearchCommand(SearchCommand.Context cxt)
           
 
Method Summary
protected  void collectFacets(org.apache.solr.client.solrj.response.QueryResponse response, ResultList<ResultItem> searchResult)
           
protected  void createFacets(org.apache.solr.client.solrj.SolrQuery query)
           
protected  SolrSearchCommand.FacetToolkit createFacetToolkit()
           
protected  BasicResultItem createItem(org.apache.solr.common.SolrDocument doc)
           
 ResultList<ResultItem> execute()
           
 SolrCommandConfig getSearchConfiguration()
          Returns the configuration associated with this search command.
protected  void modifyQuery(org.apache.solr.client.solrj.SolrQuery query)
          Override this to set additional parameters in the SolrQuery.
 
Methods inherited from class no.sesat.search.mode.command.AbstractSearchCommand
addFilterString, call, constructQueryBuilder, createQuery, createQuery, escape, getCurrentOffset, getEngine, getFieldFilter, getFilter, getFilterBuilder, getOffset, getParameter, getQuery, getQueryBuilder, getQueryRepresentation, getReservedWords, getResultsToReturn, getSearchResult, getSingleParameter, getTransformedQuery, getTransformedQuerySesamSyntax, getTransformedTerms, getUserSortBy, handleCancellation, initialiseTransformedTerms, isCancelled, isPaginated, isUserSortable, performExecution, performQueryTransformation, performResultHandling, setTransformedQuerySesamSyntax, statisticsInfo, toString, updateTransformedQuerySesamSyntax, visitXorClause
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SolrSearchCommand

public SolrSearchCommand(SearchCommand.Context cxt)
Method Detail

execute

public ResultList<ResultItem> execute()
Specified by:
execute in class AbstractSearchCommand

getSearchConfiguration

public SolrCommandConfig getSearchConfiguration()
Description copied from interface: SearchCommand
Returns the configuration associated with this search command. Typically delegates to the context provided.

Specified by:
getSearchConfiguration in interface SearchCommand
Overrides:
getSearchConfiguration in class AbstractSearchCommand
Returns:
The search configuration.

modifyQuery

protected void modifyQuery(org.apache.solr.client.solrj.SolrQuery query)
Override this to set additional parameters in the SolrQuery. Crucial for any override to call super.modifyQuery(query)


createFacetToolkit

protected SolrSearchCommand.FacetToolkit createFacetToolkit()

createFacets

protected final void createFacets(org.apache.solr.client.solrj.SolrQuery query)

collectFacets

protected final void collectFacets(org.apache.solr.client.solrj.response.QueryResponse response,
                                   ResultList<ResultItem> searchResult)

createItem

protected BasicResultItem createItem(org.apache.solr.common.SolrDocument doc)


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