php_solr
[ class tree: php_solr ] [ index: php_solr ] [ all elements ]

Class: SolrFacetFieldParameters

Source Location: /src/search/SolrFacetFieldParameters.php

Class Overview


Common parameters for facet fields.


Author(s):

Variables

Methods


Child classes:

SolrFacetField
A facet field.
SolrSimpleFacets
A set of parameters to enable Solr's SimpleFacets in SolrQuery.

Class Details

[line 52]
Common parameters for facet fields.



Tags:

author:  Alexander M. Turek <rabus@users.sourceforge.net>
see:  http://wiki.apache.org/solr/SimpleFacetParameters
abstract:  
since:  0.4.1


[ Top ]


Class Variables

$fieldName =  null

[line 101]

Prefix for facet parameters.



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


method buildQueryParameter [line 117]

string buildQueryParameter( string $name, string $value, [bool $withPrefix = true])

Builds a query parameter.

This is a helper function for getQueryStringPart(). If $fieldName is set, this function generates parameters for this specific field.




Tags:

access:  protected
uses:  urlencode()


Parameters:

string   $name   Name of the parameter.
string   $value   Value of the parameter.
bool   $withPrefix   Prepend field name (if present)?

[ Top ]

method getQueryStringPart [line 131]

string getQueryStringPart( [string $solrSpecVersion = null])

Returns the faceting part of the HTTP query.



Tags:

access:  public


Overridden in child classes as:

SolrFacetField::getQueryStringPart()
Returns the faceting part of the HTTP query.
SolrSimpleFacets::getQueryStringPart()
Returns the faceting part of the HTTP query.

Parameters:

string   $solrSpecVersion   The servers specification version (optional).

[ Top ]

method setLimit [line 215]

void setLimit( [integer $limit = null])

Sets the maximum number of constraint counts.

This param indicates the maximum number of constraint counts that should be returned for the facet fields.

A negative value means unlimited. Passing null or calling this function without a parameter resets your setting to the server default.




Tags:

access:  public


Parameters:

integer   $limit  

[ Top ]

method setMinCount [line 255]

void setMinCount( [integer $minCount = null])

Sets the minimum counts for facet fields.

Passing null or calling this function without a parameter resets your setting to the server default.




Tags:

access:  public


Parameters:

integer   $minCount  

[ Top ]

method setMissing [line 279]

void setMissing( [bool $missing = null])

Include "missing value" as a facet count?

Set to "true" this param indicates that in addition to the Term based constraints of a facet field, a count of all matching results which have no value for the field should be computed.

Passing null or calling this function without a parameter resets your setting to the server default.




Tags:

access:  public


Parameters:

bool   $missing  

[ Top ]

method setOffset [line 235]

void setOffset( [integer $offset = null])

Sets the offset for the the list of constraints to allow paging.

Passing null or calling this function without a parameter resets your setting to the server default.




Tags:

access:  public


Parameters:

integer   $offset  

[ Top ]

method setPrefix [line 172]

void setPrefix( [string $prefix = null])

Sets the facet prefix.

The terms on which to facet are limited to those starting with the given string prefix.




Tags:

access:  public


Parameters:

string   $prefix  

[ Top ]

method setSort [line 196]

void setSort( [string $sort = null])

Sets the ordering of the facets.

Please use the constants SolrQuery::FACET_SORT_LEX or SolrQuery::FACET_SORT_COUNT here.

Passing null or calling this function without a parameter resets your setting to the server default.




Tags:

access:  public


Parameters:

string   $sort   Either SolrQuery::FACET_SORT_LEX or SolrQuery::FACET_SORT_COUNT.

[ Top ]


Documentation generated on Wed, 20 May 2009 12:51:11 +0000 by phpDocumentor 1.4.2