org.apache.solr.request
Class DisMaxRequestHandler

java.lang.Object
  extended by org.apache.solr.request.DisMaxRequestHandler
All Implemented Interfaces:
SolrInfoMBean, SolrRequestHandler

public class DisMaxRequestHandler
extends Object
implements SolrRequestHandler, SolrInfoMBean

A Generic query plugin designed to be given a simple query expression from a user, which it will then query against a variety of pre-configured fields, in a variety of ways, using BooleanQueries, DisjunctionMaxQueries, and PhraseQueries.

All of the following options may be configured for this plugin in the solrconfig as defaults, and may be overriden as request parameters

The following options are only available as request params...

 :TODO: document facet param support

 :TODO: make bf,pf,qf multival params now that SolrParams supports them
 


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoMBean
SolrInfoMBean.Category
 
Constructor Summary
DisMaxRequestHandler()
           
 
Method Summary
 SolrInfoMBean.Category getCategory()
          Purpose of this Class
 String getDescription()
          Simple one or two line description
 URL[] getDocs()
          Documentation URL list.
protected  NamedList getFacetInfo(SolrQueryRequest req, SolrQueryResponse rsp, DocSet mainSet)
          Fetches information about Facets for this request.
 String getName()
          Simple common usage name, e.g.
 String getSource()
          CVS Source, SVN Source, etc
 String getSourceId()
          CVS Id, SVN Id, etc
 NamedList getStatistics()
          Any statistics this instance would like to be publicly available via the Solr Administration interface.
 String getVersion()
          Simple common usage version, e.g.
 void handleRequest(SolrQueryRequest req, SolrQueryResponse rsp)
          Handles a query request, this method must be thread safe.
 void init(NamedList args)
          sets the default variables for any usefull info it finds in the config if a config option is not inthe format expected, logs an warning and ignores it..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisMaxRequestHandler

public DisMaxRequestHandler()
Method Detail

getDocs

public URL[] getDocs()
Description copied from interface: SolrInfoMBean
Documentation URL list.

Suggested documentation URLs: Homepage for sponsoring project, FAQ on class usage, Design doc for class, Wiki, bug reporting URL, etc...

Specified by:
getDocs in interface SolrInfoMBean

getName

public String getName()
Description copied from interface: SolrInfoMBean
Simple common usage name, e.g. BasicQueryHandler, or fully qualified clas name.

Specified by:
getName in interface SolrInfoMBean

getStatistics

public NamedList getStatistics()
Description copied from interface: SolrInfoMBean
Any statistics this instance would like to be publicly available via the Solr Administration interface.

Any Object type may be stored in the list, but only the toString() representation will be used.

Specified by:
getStatistics in interface SolrInfoMBean

getVersion

public String getVersion()
Description copied from interface: SolrInfoMBean
Simple common usage version, e.g. 2.0

Specified by:
getVersion in interface SolrInfoMBean

getDescription

public String getDescription()
Description copied from interface: SolrInfoMBean
Simple one or two line description

Specified by:
getDescription in interface SolrInfoMBean

getCategory

public SolrInfoMBean.Category getCategory()
Description copied from interface: SolrInfoMBean
Purpose of this Class

Specified by:
getCategory in interface SolrInfoMBean

getSourceId

public String getSourceId()
Description copied from interface: SolrInfoMBean
CVS Id, SVN Id, etc

Specified by:
getSourceId in interface SolrInfoMBean

getSource

public String getSource()
Description copied from interface: SolrInfoMBean
CVS Source, SVN Source, etc

Specified by:
getSource in interface SolrInfoMBean

init

public void init(NamedList args)
sets the default variables for any usefull info it finds in the config if a config option is not inthe format expected, logs an warning and ignores it..

Specified by:
init in interface SolrRequestHandler

handleRequest

public void handleRequest(SolrQueryRequest req,
                          SolrQueryResponse rsp)
Description copied from interface: SolrRequestHandler
Handles a query request, this method must be thread safe.

Information about the request may be obtained from req and response information may be set using rsp.

There are no mandatory actions that handleRequest must perform. An empty handleRequest implementation would fulfill all interface obligations.

Specified by:
handleRequest in interface SolrRequestHandler

getFacetInfo

protected NamedList getFacetInfo(SolrQueryRequest req,
                                 SolrQueryResponse rsp,
                                 DocSet mainSet)
Fetches information about Facets for this request. Subclasses may with to override this method to provide more advanced faceting behavior.

See Also:
SimpleFacets.getFacetCounts()


Copyright © 2006 - 2006 The Apache Software Foundation