SolrQueryRequestBase (Solr 3.6.2 API)
Keywords: org.apache.solr.request.SolrQueryRequestBase class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.request
Class SolrQueryRequestBase

    java.lang.Object
      org.apache.solr.request.SolrQueryRequestBase

All Implemented Interfaces:
  SolrQueryRequest

Direct Known Subclasses:
  LocalSolrQueryRequest

    public abstract class SolrQueryRequestBase

extends Object
implements SolrQueryRequest

Base implementation of `SolrQueryRequest` that provides some convenience methods for accessing parameters, and manages an IndexSearcher reference.

The `close()` method must be called on any instance of this class once it is no longer in use.

Version:
  $Id: SolrQueryRequestBase.java 1065312 2011-01-30 16:08:25Z rmuir $

Field Summary
`protected Map<Object,Object>` | `context`
`protected SolrCore` | `core`
`protected SolrParams` | `origParams`
`protected SolrParams` | `params`
`static String` | `QUERY_NAME` Deprecated. Use org.apache.solr.common.params.CommonParams
`static String` | `QUERYTYPE_NAME` Deprecated. Use org.apache.solr.common.params.CommonParams
`static String` | `ROWS_NAME` Deprecated. Use org.apache.solr.common.params.CommonParams
`protected RefCounted<SolrIndexSearcher>` | `searcherHolder`
`static String` | `START_NAME` Deprecated. Use org.apache.solr.common.params.CommonParams
`protected long` | `startTime`
`protected Iterable<ContentStream>` | `streams`
`static String` | `XSL_NAME` Deprecated. Use org.apache.solr.common.params.CommonParams

Constructor Summary
`SolrQueryRequestBase(SolrCore core, SolrParams params)`

Method Summary
`void` | `close()` Frees resources associated with this request, this method must be called when the object is no longer in use.
`Iterable<ContentStream>` | `getContentStreams()` A Collection of ContentStreams passed to the request
`Map<Object,Object>` | `getContext()` Generic information associated with this request that may be both read and updated.
`SolrCore` | `getCore()` The solr core (coordinator, etc) associated with this request
`int` | `getIntParam(String name)` Deprecated. use getParams().required().getInt( name ) instead
`int` | `getIntParam(String name, int defval)` Deprecated. use getParams().required().getInt( name ) instead
`int` | `getLimit()` Deprecated. Use `getParams()` and `CommonParams.ROWS` instead.
`SolrParams` | `getOriginalParams()` Returns the original request parameters.
`String` | `getParam(String name)` Deprecated. Use `getParams()` instead.
`SolrParams` | `getParams()` returns the current request parameters
`String[]` | `getParams(String name)` Deprecated. Use `getParams()` instead.
`String` | `getParamString()` Returns a string representing all the important parameters.
`String` | `getQueryString()` Deprecated. Use `getParams()` and `CommonParams.Q` instead.
`String` | `getQueryType()` Deprecated. Use `getParams()` and `CommonParams.QT` instead.
`IndexSchema` | `getSchema()` The index schema associated with this request
`SolrIndexSearcher` | `getSearcher()` The index searcher associated with this request
`int` | `getStart()` Deprecated. Use `getParams()` and `CommonParams.START` instead.
`long` | `getStartTime()` The start time of this request in milliseconds
`String` | `getStrParam(String name)` Deprecated. use getParams().required().getParam( name ) instead
`String` | `getStrParam(String name, String defval)` Deprecated. use getParams().required().getParam( name ) instead
`void` | `setContentStreams(Iterable<ContentStream> s)`
`void` | `setParams(SolrParams params)` Change the parameters for this request.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### QUERY_NAME

    @Deprecated
    public static final String QUERY_NAME

  Deprecated. Use org.apache.solr.common.params.CommonParams
  See Also:
    Constant Field Values

### START_NAME

    @Deprecated
    public static final String START_NAME

  Deprecated. Use org.apache.solr.common.params.CommonParams
  See Also:
    Constant Field Values

### ROWS_NAME

    @Deprecated
    public static final String ROWS_NAME

  Deprecated. Use org.apache.solr.common.params.CommonParams
  See Also:
    Constant Field Values

### XSL_NAME

    @Deprecated
    public static final String XSL_NAME

  Deprecated. Use org.apache.solr.common.params.CommonParams
  See Also:
    Constant Field Values

### QUERYTYPE_NAME

    @Deprecated
    public static final String QUERYTYPE_NAME

  Deprecated. Use org.apache.solr.common.params.CommonParams
  See Also:
    Constant Field Values

### core

    protected final SolrCore core

### origParams

    protected final SolrParams origParams

### params

    protected SolrParams params

### context

    protected Map<Object,Object> context

### streams

    protected Iterable<ContentStream> streams

### startTime

    protected final long startTime

### searcherHolder

    protected RefCounted<SolrIndexSearcher> searcherHolder

Constructor Detail

### SolrQueryRequestBase

    public SolrQueryRequestBase(SolrCore core,
                                SolrParams params)

Method Detail

### getContext

    public Map<Object,Object> getContext()

  Description copied from interface: `SolrQueryRequest`
  Generic information associated with this request that may be both read and updated.

  Specified by:
    `getContext` in interface `SolrQueryRequest`

### getParams

    public SolrParams getParams()

  Description copied from interface: `SolrQueryRequest`
  returns the current request parameters

  Specified by:
    `getParams` in interface `SolrQueryRequest`

### getOriginalParams

    public SolrParams getOriginalParams()

  Description copied from interface: `SolrQueryRequest`
  Returns the original request parameters. As this does not normally include configured defaults it's more suitable for logging.

  Specified by:
    `getOriginalParams` in interface `SolrQueryRequest`

### setParams

    public void setParams(SolrParams params)

  Description copied from interface: `SolrQueryRequest`
  Change the parameters for this request. This does not affect the original parameters returned by getOriginalParams()

  Specified by:
    `setParams` in interface `SolrQueryRequest`

### getParam

    @Deprecated
    public String getParam(String name)

  Deprecated. Use `getParams()` instead.

  Description copied from interface: `SolrQueryRequest`
  Returns the input parameter value for the specified name

  Specified by:
    `getParam` in interface `SolrQueryRequest`
  Returns:
    the value, or the first value if the parameter was specified more then once; may be null.

### getParams

    @Deprecated
    public String[] getParams(String name)

  Deprecated. Use `getParams()` instead.

  Description copied from interface: `SolrQueryRequest`
  Returns the input parameter values for the specified name

  Specified by:
    `getParams` in interface `SolrQueryRequest`
  Returns:
    the values; may be null or empty depending on implementation

### getIntParam

    @Deprecated
    public int getIntParam(String name)

  Deprecated. use getParams().required().getInt( name ) instead

### getIntParam

    @Deprecated
    public int getIntParam(String name,
                                      int defval)

  Deprecated. use getParams().required().getInt( name ) instead

### getStrParam

    @Deprecated
    public String getStrParam(String name)

  Deprecated. use getParams().required().getParam( name ) instead

### getStrParam

    @Deprecated
    public String getStrParam(String name,
                                         String defval)

  Deprecated. use getParams().required().getParam( name ) instead

### getQueryString

    @Deprecated
    public String getQueryString()

  Deprecated. Use `getParams()` and `CommonParams.Q` instead.

  Description copied from interface: `SolrQueryRequest`
  Returns the primary query string parameter of the request

  Specified by:
    `getQueryString` in interface `SolrQueryRequest`

### getQueryType

    @Deprecated
    public String getQueryType()

  Deprecated. Use `getParams()` and `CommonParams.QT` instead.

  Description copied from interface: `SolrQueryRequest`
  Signifies the syntax and the handler that should be used to execute this query.

  Specified by:
    `getQueryType` in interface `SolrQueryRequest`

### getStart

    @Deprecated
    public int getStart()

  Deprecated. Use `getParams()` and `CommonParams.START` instead.

  starting position in matches to return to client

  Specified by:
    `getStart` in interface `SolrQueryRequest`

### getLimit

    @Deprecated
    public int getLimit()

  Deprecated. Use `getParams()` and `CommonParams.ROWS` instead.

  number of matching documents to return

  Specified by:
    `getLimit` in interface `SolrQueryRequest`

### getStartTime

    public long getStartTime()

  Description copied from interface: `SolrQueryRequest`
  The start time of this request in milliseconds

  Specified by:
    `getStartTime` in interface `SolrQueryRequest`

### getSearcher

    public SolrIndexSearcher getSearcher()

  Description copied from interface: `SolrQueryRequest`
  The index searcher associated with this request

  Specified by:
    `getSearcher` in interface `SolrQueryRequest`

### getCore

    public SolrCore getCore()

  Description copied from interface: `SolrQueryRequest`
  The solr core (coordinator, etc) associated with this request

  Specified by:
    `getCore` in interface `SolrQueryRequest`

### getSchema

    public IndexSchema getSchema()

  Description copied from interface: `SolrQueryRequest`
  The index schema associated with this request

  Specified by:
    `getSchema` in interface `SolrQueryRequest`

### close

    public void close()

  Frees resources associated with this request, this method must be called when the object is no longer in use.

  Specified by:
    `close` in interface `SolrQueryRequest`

### getContentStreams

    public Iterable<ContentStream> getContentStreams()

  A Collection of ContentStreams passed to the request

  Specified by:
    `getContentStreams` in interface `SolrQueryRequest`

### setContentStreams

    public void setContentStreams(Iterable<ContentStream> s)

### getParamString

    public String getParamString()

  Description copied from interface: `SolrQueryRequest`
  Returns a string representing all the important parameters. Suitable for logging.

  Specified by:
    `getParamString` in interface `SolrQueryRequest`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD