class SolrDisMaxQuery extends SolrQuery implements Serializable (View source)

(PECL solr >= 2.1.0)
Version not present on php.net documentation, determined here by using PECL solr changelog: https://pecl.php.net/package-changelog.php?package=solr&release=2.1.0
Class SolrDisMaxQuery

Constants

ORDER_ASC

ORDER_DESC

FACET_SORT_INDEX

FACET_SORT_COUNT

TERMS_SORT_INDEX

TERMS_SORT_COUNT

Methods

SolrParams|false
add(string $name, string $value)

(PECL solr >= 0.9.2)
This is an alias for SolrParams::addParam

SolrParams|false
addParam(string $name, string $value)

(PECL solr >= 0.9.2)
Adds a parameter to the object

mixed
get(string $param_name)

(PECL solr >= 0.9.2)
This is an alias for SolrParams::getParam

mixed
getParam(string $param_name)

(PECL solr >= 0.9.2)
Returns a parameter value

array
getParams()

(PECL solr >= 0.9.2)
Returns an array of non URL-encoded parameters

array
getPreparedParams()

(PECL solr >= 0.9.2)
Returns an array of URL-encoded parameters

string|null
serialize()

(PECL solr >= 0.9.2)
Used for custom serialization

SolrParams|false
set(string $name, string $value)

(PECL solr >= 0.9.2)
An alias of SolrParams::setParam

SolrParams|false
setParam(string $name, string $value)

(PECL solr >= 0.9.2)
Sets the parameter to the specified value

string|false
toString(bool $url_encode = false)

(PECL solr >= 0.9.2)
Returns all the name-value pair parameters in the object

void
unserialize(string $serialized)

(PECL solr >= 0.9.2)
Used for custom serialization

__construct(string $q = '')

(PECL solr >= 0.9.2)
SolrQuery constructor.

__destruct()

(PECL solr >= 0.9.2)
Destructor

addExpandFilterQuery(string $fq)

(PECL solr >= 2.2.0)
Overrides main filter query, determines which documents to include in the main group.

addExpandSortField(string $field, string $order)

(PECL solr >= 2.2.0)
Orders the documents within the expanded groups (expand.sort parameter).

addFacetDateField(string $dateField)

(PECL solr >= 0.9.2)
Maps to facet.date

addFacetDateOther(string $value, string $field_override)

(PECL solr >= 0.9.2)
Adds another facet.date.other parameter

addFacetField(string $field)

(PECL solr >= 0.9.2)
Adds another field to the facet

addFacetQuery(string $facetQuery)

(PECL solr >= 0.9.2)
Adds a facet query

addField(string $field)

(PECL solr >= 0.9.2)
Specifies which fields to return in the result

addFilterQuery(string $fq)

(PECL solr >= 0.9.2)
Specifies a filter query

addGroupField(string $value)

(PECL solr >= 2.2.0)
Add a field to be used to group results.

addGroupFunction(string $value)

(PECL solr >= 2.2.0)
Allows grouping results based on the unique values of a function query (group.func parameter).

addGroupQuery(string $value)

(PECL solr >= 2.2.0)
Allows grouping of documents that match the given query.

addGroupSortField(string $field, int $order)

(PECL solr >= 2.2.0)
Add a group sort field (group.sort parameter).

addHighlightField(string $field)

(PECL solr >= 0.9.2)
Maps to hl.fl

addMltField(string $field)

(PECL solr >= 0.9.2)
Sets a field to use for similarity

addMltQueryField(string $field, float $boost)

(PECL solr >= 0.9.2)
Maps to mlt.qf

addSortField(string $field, int $order = SolrQuery::ORDER_DESC)

(PECL solr >= 0.9.2)
Used to control how the results should be sorted

addStatsFacet(string $field)

(PECL solr >= 0.9.2)
Requests a return of sub results for values within the given facet

addStatsField(string $field)

(PECL solr >= 0.9.2)
Maps to stats.field parameter

collapse(SolrCollapseFunction $collapseFunction)

(No version information available, might only be in Git)
Collapses the result set to a single document per group

bool
getExpand()

(PECL solr >= 2.2.0)
Returns true if group expanding is enabled

array
getExpandFilterQueries()

(PECL solr >= 2.2.0)
Returns the expand filter queries

array
getExpandQuery()

(PECL solr >= 2.2.0)
Returns the expand query expand.q parameter

int
getExpandRows()

(PECL solr >= 2.2.0)
Returns The number of rows to display in each group (expand.rows)

array
getExpandSortFields()

(PECL solr >= 2.2.0)
Returns an array of fields

bool|null
getFacet()

(PECL solr >= 0.9.2)
Returns the value of the facet parameter

string|null
getFacetDateEnd(string $field_override)

(PECL solr >= 0.9.2)
Returns the value for the facet.date.end parameter

array|null
getFacetDateFields()

(PECL solr >= 0.9.2)
Returns all the facet.date fields

string|null
getFacetDateGap(string $field_override)

(PECL solr >= 0.9.2)
Returns the value of the facet.date.gap parameter

string|null
getFacetDateHardEnd(string $field_override)

(PECL solr >= 0.9.2)
Returns the value of the facet.date.hardend parameter

array|null
getFacetDateOther(string $field_override)

(PECL solr >= 0.9.2)
Returns the value for the facet.date.other parameter

string|null
getFacetDateStart(string $field_override)

(PECL solr >= 0.9.2)
Returns the lower bound for the first date range for all date faceting on this field

array|null
getFacetFields()

(PECL solr >= 0.9.2)
Returns all the facet fields

int|null
getFacetLimit(string $field_override)

(PECL solr >= 0.9.2)
Returns the maximum number of constraint counts that should be returned for the facet fields

string|null
getFacetMethod(string $field_override)

(PECL solr >= 0.9.2)
Returns the value of the facet.method parameter

int|null
getFacetMinCount(string $field_override)

(PECL solr >= 0.9.2)
Returns the minimum counts for facet fields should be included in the response

string|null
getFacetMissing(string $field_override)

(PECL solr >= 0.9.2)
Returns the current state of the facet.missing parameter

int|null
getFacetOffset(string $field_override)

(PECL solr >= 0.9.2)
Returns an offset into the list of constraints to be used for pagination

string|null
getFacetPrefix(string $field_override)

(PECL solr >= 0.9.2)
Returns the facet prefix

string|null
getFacetQueries()

(PECL solr >= 0.9.2)
Returns all the facet queries

int|null
getFacetSort(string $field_override)

(PECL solr >= 0.9.2)
Returns the facet sort type

string|null
getFields()

(PECL solr >= 0.9.2)
Returns the list of fields that will be returned in the response

string|null
getFilterQueries()

(PECL solr >= 0.9.2)
Returns an array of filter queries

bool
getGroup()

(PECL solr >= 2.2.0)
Returns true if grouping is enabled https://secure.php.net/manual/en/solrquery.getgroup.php

int
getGroupCachePercent()

(PECL solr >= 2.2.0)
Returns group cache percent value

bool
getGroupFacet()

(PECL solr >= 2.2.0)
Returns the group.facet parameter value

array
getGroupFields()

(PECL solr >= 2.2.0)
Returns group fields (group.field parameter values)

string
getGroupFormat()

(PECL solr >= 2.2.0)
Returns the group.format value

array
getGroupFunctions()

(PECL solr >= 2.2.0)
Returns group functions (group.func parameter values)

int
getGroupLimit()

(PECL solr >= 2.2.0)
Returns the group.limit value

bool
getGroupMain()

(PECL solr >= 2.2.0)
Returns the group.main value

bool
getGroupNGroups()

(PECL solr >= 2.2.0)
Returns the group.ngroups value

bool
getGroupOffset()

(PECL solr >= 2.2.0)
Returns the group.offset value

array
getGroupQueries()

(PECL solr >= 2.2.0)
Returns all the group.query parameter values

array
getGroupSortFields()

(PECL solr >= 2.2.0)
Returns the group.sort value

bool
getGroupTruncate()

(PECL solr >= 2.2.0)
Returns the group.truncate value

bool
getHighlight()

(PECL solr >= 0.9.2)
Returns the state of the hl parameter

string|null
getHighlightAlternateField(string $field_override)

(PECL solr >= 0.9.2)
Returns the highlight field to use as backup or default

array|null
getHighlightFields()

(PECL solr >= 0.9.2)
Returns all the fields that Solr should generate highlighted snippets for

string|null
getHighlightFormatter(string $field_override)

(PECL solr >= 0.9.2)
Returns the formatter for the highlighted output

string|null
getHighlightFragmenter(string $field_override)

(PECL solr >= 0.9.2)
Returns the text snippet generator for highlighted text

int|null
getHighlightFragsize(string $field_override)

(PECL solr >= 0.9.2)
Returns the number of characters of fragments to consider for highlighting

bool|null
getHighlightHighlightMultiTerm()

(PECL solr >= 0.9.2)
Returns whether or not to enable highlighting for range/wildcard/fuzzy/prefix queries

int|null
getHighlightMaxAlternateFieldLength(string $field_override)

(PECL solr >= 0.9.2)
Returns the maximum number of characters of the field to return

int|null
getHighlightMaxAnalyzedChars()

(PECL solr >= 0.9.2)
Returns the maximum number of characters into a document to look for suitable snippets

bool|null
getHighlightMergeContiguous(string $field_override)

(PECL solr >= 0.9.2)
Returns whether or not the collapse contiguous fragments into a single fragment

int|null
getHighlightRegexMaxAnalyzedChars()

(PECL solr >= 0.9.2)
Returns the maximum number of characters from a field when using the regex fragmenter

string
getHighlightRegexPattern()

(PECL solr >= 0.9.2)
Returns the regular expression for fragmenting

float|null
getHighlightRegexSlop()

(PECL solr >= 0.9.2)
Returns the deviation factor from the ideal fragment size

bool|null
getHighlightRequireFieldMatch()

(PECL solr >= 0.9.2)
Returns if a field will only be highlighted if the query matched in this particular field

string|null
getHighlightSimplePost(string $field_override)

(PECL solr >= 0.9.2)
Returns the text which appears after a highlighted term

string|null
getHighlightSimplePre(string $field_override)

(PECL solr >= 0.9.2)
Returns the text which appears before a highlighted term

int|null
getHighlightSnippets(string $field_override)

(PECL solr >= 0.9.2)
Returns the maximum number of highlighted snippets to generate per field

bool|null
getHighlightUsePhraseHighlighter()

(PECL solr >= 0.9.2)
Returns the state of the hl.usePhraseHighlighter parameter

bool|null
getMlt()

(PECL solr >= 0.9.2)
Returns whether or not MoreLikeThis results should be enabled

bool|null
getMltBoost()

(PECL solr >= 0.9.2)
Returns whether or not the query will be boosted by the interesting term relevance

int|null
getMltCount()

(PECL solr >= 0.9.2)
Returns the number of similar documents to return for each result

array
getMltFields()

(PECL solr >= 0.9.2)
Returns all the fields to use for similarity

int|null
getMltMaxNumQueryTerms()

(PECL solr >= 0.9.2)
Returns the maximum number of query terms that will be included in any generated query

int
getMltMaxNumTokens()

(PECL solr >= 0.9.2)
Returns the maximum number of tokens to parse in each document field that is not stored with TermVector support

int|null
getMltMaxWordLength()

(PECL solr >= 0.9.2)
Returns the maximum word length above which words will be ignored

int|null
getMltMinDocFrequency()

(PECL solr >= 0.9.2)
Returns the threshold frequency at which words will be ignored which do not occur in at least this many docs

int|null
getMltMinTermFrequency()

(PECL solr >= 0.9.2)
Returns the frequency below which terms will be ignored in the source document

int
getMltMinWordLength()

(PECL solr >= 0.9.2)
Returns the minimum word length below which words will be ignored

array|null
getMltQueryFields()

(PECL solr >= 0.9.2)
Returns the query fields and their boosts

string
getQuery()

(PECL solr >= 0.9.2)
Returns the main query

int|null
getRows()

(PECL solr >= 0.9.2)
Returns the maximum number of documents

array
getSortFields()

(PECL solr >= 0.9.2)
Returns all the sort fields

int|null
getStart()

(PECL solr >= 0.9.2)
Returns the offset in the complete result set

bool|null
getStats()

(PECL solr >= 0.9.2)
Returns whether or not stats is enabled

array|null
getStatsFacets()

(PECL solr >= 0.9.2)
Returns all the stats facets that were set

array|null
getStatsFields()

(PECL solr >= 0.9.2)
Returns all the statistics fields

bool|null
getTerms()

(PECL solr >= 0.9.2)
Returns whether or not the TermsComponent is enabled

string|null
getTermsField()

(PECL solr >= 0.9.2)
Returns the field from which the terms are retrieved

bool|null
getTermsIncludeLowerBound()

(PECL solr >= 0.9.2)
Returns whether or not to include the lower bound in the result set

bool|null
getTermsIncludeUpperBound()

(PECL solr >= 0.9.2)
Returns whether or not to include the upper bound term in the result set

int|null
getTermsLimit()

(PECL solr >= 0.9.2)
Returns the maximum number of terms Solr should return

string|null
getTermsLowerBound()

(PECL solr >= 0.9.2)
Returns the term to start at

int|null
getTermsMaxCount()

(PECL solr >= 0.9.2)
Returns the maximum document frequency

int|null
getTermsMinCount()

(PECL solr >= 0.9.2)
Returns the minimum document frequency to return in order to be included

string|null
getTermsPrefix()

(PECL solr >= 0.9.2)
Returns the term prefix

bool|null
getTermsReturnRaw()

(PECL solr >= 0.9.2)
Whether or not to return raw characters

int|null
getTermsSort()

(PECL solr >= 0.9.2)
Returns an integer indicating how terms are sorted

string|null
getTermsUpperBound()

(PECL solr >= 0.9.2)
Returns the term to stop at

int|null
getTimeAllowed()

(PECL solr >= 0.9.2)
Returns the time in milliseconds allowed for the query to finish

removeExpandFilterQuery(string $fq)

(PECL solr >= 2.2.0)
Removes an expand filter query

removeExpandSortField(string $field)

(PECL solr >= 2.2.0)
Removes an expand sort field from the expand.sort parameter.

removeFacetDateField(string $field)

(PECL solr >= 0.9.2)
Removes one of the facet date fields

removeFacetDateOther(string $value, string $field_override)

(PECL solr >= 0.9.2)
Removes one of the facet.date.other parameters

removeFacetField(string $field)

(PECL solr >= 0.9.2)
Removes one of the facet.date parameters

removeFacetQuery(string $value)

(PECL solr >= 0.9.2)
Removes one of the facet.query parameters

removeField(string $field)

(PECL solr >= 0.9.2)
Removes a field from the list of fields

removeFilterQuery(string $fq)

(PECL solr >= 0.9.2)
Removes a filter query

removeHighlightField(string $field)

(PECL solr >= 0.9.2)
Removes one of the fields used for highlighting

removeMltField(string $field)

(PECL solr >= 0.9.2)
Removes one of the moreLikeThis fields

removeMltQueryField(string $queryField)

(PECL solr >= 0.9.2)
Removes one of the moreLikeThis query fields

removeSortField(string $field)

(PECL solr >= 0.9.2)
Removes one of the sort fields

removeStatsFacet(string $value)

(PECL solr >= 0.9.2)
Removes one of the stats.facet parameters

removeStatsField(string $field)

(PECL solr >= 0.9.2)
Removes one of the stats.field parameters

setEchoHandler(bool $flag)

(PECL solr >= 0.9.2)
Toggles the echoHandler parameter

setEchoParams(string $type)

(PECL solr >= 0.9.2)
Determines what kind of parameters to include in the response

setExpand(bool $value)

(PECL solr >= 2.2.0)
Enables/Disables the Expand Component

setExpandQuery(string $q)

(PECL solr >= 2.2.0)
Sets the expand.q parameter

setExpandRows(int $value)

(PECL solr >= 2.2.0)
Sets the number of rows to display in each group (expand.rows). Server Default 5

setExplainOther(string $query)

(PECL solr >= 0.9.2)
Sets the explainOther common query parameter

setFacet(bool $flag)

(PECL solr >= 0.9.2)
Maps to the facet parameter. Enables or disables facetting

setFacetDateEnd(string $value, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.date.end

setFacetDateGap(string $value, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.date.gap

setFacetDateHardEnd(bool $value, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.date.hardend

setFacetDateStart(string $value, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.date.start

setFacetEnumCacheMinDefaultFrequency(int $frequency, string $field_override)

(PECL solr >= 0.9.2)
Sets the minimum document frequency used for determining term count

setFacetLimit(int $limit, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.limit

setFacetMethod(string $method, string $field_override)

(PECL solr >= 0.9.2)
Specifies the type of algorithm to use when faceting a field

setFacetMinCount(int $mincount, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.mincount

setFacetMissing(bool $flag, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.missing

setFacetOffset(int $offset, string $field_override)

(PECL solr >= 0.9.2)
Sets the offset into the list of constraints to allow for pagination

setFacetPrefix(string $prefix, string $field_override)

(PECL solr >= 0.9.2)
Specifies a string prefix with which to limits the terms on which to facet

setFacetSort(int $facetSort, string $field_override)

(PECL solr >= 0.9.2)
Determines the ordering of the facet field constraints

setGroup(bool $value)

(PECL solr >= 2.2.0)
Enable/Disable result grouping (group parameter)

setGroupCachePercent(int $percent)

(PECL solr >= 2.2.0)
Enables caching for result grouping

setGroupFacet(bool $value)

(PECL solr >= 2.2.0)
Sets group.facet parameter

setGroupFormat(string $value)

(PECL solr >= 2.2.0)
Sets the group format, result structure (group.format parameter).

setGroupLimit(int $value)

(PECL solr >= 2.2.0)
Specifies the number of results to return for each group. The server default value is 1.

setGroupMain(string $value)

(PECL solr >= 2.2.0)
If true, the result of the first field grouping command is used as the main result list in the response, using group.format=simple.

setGroupNGroups(bool $value)

(PECL solr >= 2.2.0)
If true, Solr includes the number of groups that have matched the query in the results.

setGroupOffset(int $value)

(PECL solr >= 2.2.0)
Sets the group.offset parameter.

setGroupTruncate(bool $value)

(PECL solr >= 2.2.0)
If true, facet counts are based on the most relevant document of each group matching the query.

setHighlight(bool $flag)

(PECL solr >= 0.9.2)
Enables or disables highlighting

setHighlightAlternateField(string $field, string $field_override)

(PECL solr >= 0.9.2)
Specifies the backup field to use

setHighlightFormatter(string $formatter, string $field_override)

(PECL solr >= 0.9.2)
Specify a formatter for the highlight output

setHighlightFragmenter(string $fragmenter, string $field_override)

(PECL solr >= 0.9.2)
Sets a text snippet generator for highlighted text

setHighlightFragsize(int $size, string $field_override)

(PECL solr >= 0.9.2)
The size of fragments to consider for highlighting

setHighlightHighlightMultiTerm(bool $flag)

(PECL solr >= 0.9.2)
Use SpanScorer to highlight phrase terms

setHighlightMaxAlternateFieldLength(int $fieldLength, string $field_override)

(PECL solr >= 0.9.2)
Sets the maximum number of characters of the field to return

setHighlightMaxAnalyzedChars(int $value)

(PECL solr >= 0.9.2)
Specifies the number of characters into a document to look for suitable snippets

setHighlightMergeContiguous(bool $flag, string $field_override)

(PECL solr >= 0.9.2)
Whether or not to collapse contiguous fragments into a single fragment

setHighlightRegexMaxAnalyzedChars(int $maxAnalyzedChars)

(PECL solr >= 0.9.2)
Specify the maximum number of characters to analyze

setHighlightRegexPattern(string $value)

(PECL solr >= 0.9.2)
Specify the regular expression for fragmenting

setHighlightRegexSlop(float $factor)

(PECL solr >= 0.9.2)
Sets the factor by which the regex fragmenter can stray from the ideal fragment size

setHighlightRequireFieldMatch(bool $flag)

(PECL solr >= 0.9.2)
Require field matching during highlighting

setHighlightSimplePost(string $simplePost, string $field_override)

(PECL solr >= 0.9.2)
Sets the text which appears after a highlighted term

setHighlightSimplePre(string $simplePre, string $field_override)

(PECL solr >= 0.9.2)
Sets the text which appears before a highlighted term

setHighlightSnippets(int $value, string $field_override)

(PECL solr >= 0.9.2)
Sets the maximum number of highlighted snippets to generate per field

setHighlightUsePhraseHighlighter(bool $flag)

(PECL solr >= 0.9.2)
Whether to highlight phrase terms only when they appear within the query phrase

setMlt(bool $flag)

(PECL solr >= 0.9.2)
Enables or disables moreLikeThis

setMltBoost(bool $flag)

(PECL solr >= 0.9.2)
Set if the query will be boosted by the interesting term relevance

setMltCount(int $count)

(PECL solr >= 0.9.2)
Set the number of similar documents to return for each result

setMltMaxNumQueryTerms(int $value)

(PECL solr >= 0.9.2)
Sets the maximum number of query terms included

setMltMaxNumTokens(int $value)

(PECL solr >= 0.9.2)
Specifies the maximum number of tokens to parse

setMltMaxWordLength(int $maxWordLength)

(PECL solr >= 0.9.2)
Sets the maximum word length

setMltMinDocFrequency(int $minDocFrequency)

(PECL solr >= 0.9.2)
Sets the mltMinDoc frequency

setMltMinTermFrequency(int $minTermFrequency)

(PECL solr >= 0.9.2)
Sets the frequency below which terms will be ignored in the source docs

setMltMinWordLength(int $minWordLength)

(PECL solr >= 0.9.2)
Sets the minimum word length

setOmitHeader(bool $flag)

(PECL solr >= 0.9.2)
Exclude the header from the returned results

setQuery(string $query)

(PECL solr >= 0.9.2)
Sets the search query

setRows(int $rows)

(PECL solr >= 0.9.2)
Specifies the maximum number of rows to return in the result

setShowDebugInfo(bool $flag)

(PECL solr >= 0.9.2)
Flag to show debug information

setStart(int $start)

(PECL solr >= 0.9.2)
Specifies the number of rows to skip

setStats(bool $flag)

(PECL solr >= 0.9.2)
Enables or disables the Stats component

setTerms(bool $flag)

(PECL solr >= 0.9.2)
Enables or disables the TermsComponent

setTermsField(string $fieldname)

(PECL solr >= 0.9.2)
Sets the name of the field to get the Terms from

setTermsIncludeLowerBound(bool $flag)

(PECL solr >= 0.9.2)
Include the lower bound term in the result set

setTermsIncludeUpperBound(bool $flag)

(PECL solr >= 0.9.2)
Include the upper bound term in the result set

setTermsLimit(int $limit)

(PECL solr >= 0.9.2)
Sets the maximum number of terms to return

setTermsLowerBound(string $lowerBound)

(PECL solr >= 0.9.2)
Specifies the Term to start from

setTermsMaxCount(int $frequency)

(PECL solr >= 0.9.2)
Sets the maximum document frequency

setTermsMinCount(int $frequency)

(PECL solr >= 0.9.2)
Sets the minimum document frequency

setTermsPrefix(string $prefix)

(PECL solr >= 0.9.2)
Restrict matches to terms that start with the prefix

setTermsReturnRaw(bool $flag)

(PECL solr >= 0.9.2)
Return the raw characters of the indexed term

setTermsSort(int $sortType)

(PECL solr >= 0.9.2)
Specifies how to sort the returned terms

setTermsUpperBound(string $upperBound)

(PECL solr >= 0.9.2)
Sets the term to stop at

setTimeAllowed(int $timeAllowed)

(PECL solr >= 0.9.2)
The time allowed for search to finish

addBigramPhraseField(string $field, string $boost, string $slop)

(PECL solr >= 2.1.0)
Adds a Phrase Bigram Field (pf2 parameter)

addBoostQuery(string $field, string $value, string $boost)

(PECL solr >= 2.1.0)
Adds a boost query field with value and optional boost (bq parameter)

addPhraseField(string $field, string $boost, string $slop)

(PECL solr >= 2.1.0)
Adds a Phrase Field (pf parameter)

addQueryField(string $field, string $boost)

(PECL solr >= 2.1.0)
Add a query field with optional boost (qf parameter)

addTrigramPhraseField(string $field, string $boost, string $slop)

(PECL solr >= 2.1.0)
Adds a Trigram Phrase Field (pf3 parameter)

addUserField(string $field)

(PECL solr >= 2.1.0)
Adds a field to User Fields Parameter (uf)

removeBigramPhraseField(string $field)

(PECL solr >= 2.1.0)
Removes phrase bigram field (pf2 parameter)

removeBoostQuery(string $field)

(PECL solr >= 2.1.0)
Removes a boost query partial by field name (bq)

removePhraseField(string $field)

(PECL solr >= 2.1.0)
Removes a Phrase Field (pf parameter)

removeQueryField(string $field)

(PECL solr >= 2.1.0)
Removes a Query Field (qf parameter)

removeTrigramPhraseField(string $field)

(PECL solr >= 2.1.0)
Removes a Trigram Phrase Field (pf3 parameter)

removeUserField(string $field)

(PECL solr >= 2.1.0)
Removes a field from The User Fields Parameter (uf)

Warning
This function is currently not documented; only its argument list is available.

setBigramPhraseFields(string $fields)

(PECL solr >= 2.1.0)
Sets Bigram Phrase Fields and their boosts (and slops) using pf2 parameter

setBigramPhraseSlop(string $slop)

(PECL solr >= 2.1.0)
Sets Bigram Phrase Slop (ps2 parameter)

setBoostFunction(string $function)

(PECL solr >= 2.1.0)
Sets a Boost Function (bf parameter).

setBoostQuery(string $q)

(PECL solr >= 2.1.0)
Directly Sets Boost Query Parameter (bq)

setMinimumMatch(string $value)

(PECL solr >= 2.1.0)
Set Minimum "Should" Match (mm)

setPhraseFields(string $fields)

(PECL solr >= 2.1.0)
Sets Phrase Fields and their boosts (and slops) using pf2 parameter

setPhraseSlop(string $slop)

(PECL solr >= 2.1.0)
Sets the default slop on phrase queries (ps parameter)

setQueryAlt(string $q)

(PECL solr >= 2.1.0)
Set Query Alternate (q.alt parameter)

setQueryPhraseSlop(string $slop)

(PECL solr >= 2.1.0)
Specifies the amount of slop permitted on phrase queries explicitly included in the user's query string (qf parameter)

setTieBreaker(string $tieBreaker)

(PECL solr >= 2.1.0)
Sets Tie Breaker parameter (tie parameter)

setTrigramPhraseFields(string $fields)

(PECL solr >= 2.1.0)
Directly Sets Trigram Phrase Fields (pf3 parameter)

setTrigramPhraseSlop(string $slop)

(PECL solr >= 2.1.0)
Sets Trigram Phrase Slop (ps3 parameter)

setUserFields(string $fields)

(PECL solr >= 2.1.0)
Sets User Fields parameter (uf)

useDisMaxQueryParser()

(PECL solr >= 2.1.0)
Switch QueryParser to be DisMax Query Parser

useEDisMaxQueryParser()

(PECL solr >= 2.1.0)
Switch QueryParser to be EDisMax
By default the query builder uses edismax, if it was switched using SolrDisMaxQuery::useDisMaxQueryParser(), it can be switched back using this method.

Details

SolrParams|false add(string $name, string $value)

(PECL solr >= 0.9.2)
This is an alias for SolrParams::addParam

Parameters

string $name

The name of the parameter

string $value

The value of the parameter

Return Value

SolrParams|false

Returns a SolrParams instance on success and FALSE on failure.

SolrParams|false addParam(string $name, string $value)

(PECL solr >= 0.9.2)
Adds a parameter to the object

Parameters

string $name

The name of the parameter

string $value

The value of the parameter

Return Value

SolrParams|false

Returns a SolrParams instance on success and FALSE on failure.

final mixed get(string $param_name)

(PECL solr >= 0.9.2)
This is an alias for SolrParams::getParam

Parameters

string $param_name

The name of the parameter

Return Value

mixed

Returns an array or string depending on the type of parameter

final mixed getParam(string $param_name)

(PECL solr >= 0.9.2)
Returns a parameter value

Parameters

string $param_name

The name of the parameter

Return Value

mixed

Returns an array or string depending on the type of parameter

final array getParams()

(PECL solr >= 0.9.2)
Returns an array of non URL-encoded parameters

Return Value

array

Returns an array of non URL-encoded parameters

final array getPreparedParams()

(PECL solr >= 0.9.2)
Returns an array of URL-encoded parameters

Return Value

array

Returns an array of URL-encoded parameters

final string|null serialize()

(PECL solr >= 0.9.2)
Used for custom serialization

Return Value

string|null

The string representation of the object or null

final SolrParams|false set(string $name, string $value)

(PECL solr >= 0.9.2)
An alias of SolrParams::setParam

Parameters

string $name

The name of the parameter

string $value

The parameter value

Return Value

SolrParams|false

Returns a SolrParams instance on success and FALSE on failure.

SolrParams|false setParam(string $name, string $value)

(PECL solr >= 0.9.2)
Sets the parameter to the specified value

Parameters

string $name

The name of the parameter

string $value

The parameter value

Return Value

SolrParams|false

Returns a SolrParams instance on success and FALSE on failure.

final string|false toString(bool $url_encode = false)

(PECL solr >= 0.9.2)
Returns all the name-value pair parameters in the object

Parameters

bool $url_encode

Whether to return URL-encoded values

Return Value

string|false

Returns a string on success and FALSE on failure.

final void unserialize(string $serialized)

(PECL solr >= 0.9.2)
Used for custom serialization

Parameters

string $serialized

The serialized representation of the object

Return Value

void

__construct(string $q = '')

(PECL solr >= 0.9.2)
SolrQuery constructor.

Parameters

string $q

Optional search query

__destruct()

(PECL solr >= 0.9.2)
Destructor

SolrQuery addExpandFilterQuery(string $fq)

(PECL solr >= 2.2.0)
Overrides main filter query, determines which documents to include in the main group.

Parameters

string $fq

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addExpandSortField(string $field, string $order)

(PECL solr >= 2.2.0)
Orders the documents within the expanded groups (expand.sort parameter).

Parameters

string $field

Field name

string $order

[optional]

Order ASC/DESC, utilizes SolrQuery::ORDER_* constants.

Default: SolrQuery::ORDER_DESC

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addFacetDateField(string $dateField)

(PECL solr >= 0.9.2)
Maps to facet.date

Parameters

string $dateField

The name of the date field.

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addFacetDateOther(string $value, string $field_override)

(PECL solr >= 0.9.2)
Adds another facet.date.other parameter

Parameters

string $value

The value to use.

string $field_override

The field name for the override.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery addFacetField(string $field)

(PECL solr >= 0.9.2)
Adds another field to the facet

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery addFacetQuery(string $facetQuery)

(PECL solr >= 0.9.2)
Adds a facet query

Parameters

string $facetQuery

The facet query

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery addField(string $field)

(PECL solr >= 0.9.2)
Specifies which fields to return in the result

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addFilterQuery(string $fq)

(PECL solr >= 0.9.2)
Specifies a filter query

Parameters

string $fq

The filter query

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addGroupField(string $value)

(PECL solr >= 2.2.0)
Add a field to be used to group results.

Parameters

string $value

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addGroupFunction(string $value)

(PECL solr >= 2.2.0)
Allows grouping results based on the unique values of a function query (group.func parameter).

Parameters

string $value

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addGroupQuery(string $value)

(PECL solr >= 2.2.0)
Allows grouping of documents that match the given query.

Parameters

string $value

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addGroupSortField(string $field, int $order)

(PECL solr >= 2.2.0)
Add a group sort field (group.sort parameter).

Parameters

string $field

Field name

int $order

Order ASC/DESC, utilizes SolrQuery::ORDER_* constants

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addHighlightField(string $field)

(PECL solr >= 0.9.2)
Maps to hl.fl

Parameters

string $field

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery addMltField(string $field)

(PECL solr >= 0.9.2)
Sets a field to use for similarity

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery addMltQueryField(string $field, float $boost)

(PECL solr >= 0.9.2)
Maps to mlt.qf

Parameters

string $field

The name of the field

float $boost

Its boost value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery addSortField(string $field, int $order = SolrQuery::ORDER_DESC)

(PECL solr >= 0.9.2)
Used to control how the results should be sorted

Parameters

string $field

The name of the field

int $order

The sort direction. This should be either SolrQuery::ORDER_ASC or SolrQuery::ORDER_DESC.

Return Value

SolrQuery

Returns a SolrQuery object.

SolrQuery addStatsFacet(string $field)

(PECL solr >= 0.9.2)
Requests a return of sub results for values within the given facet

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery addStatsField(string $field)

(PECL solr >= 0.9.2)
Maps to stats.field parameter

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery collapse(SolrCollapseFunction $collapseFunction)

(No version information available, might only be in Git)
Collapses the result set to a single document per group

Parameters

SolrCollapseFunction $collapseFunction

Return Value

SolrQuery

Returns a SolrQuery object.

bool getExpand()

(PECL solr >= 2.2.0)
Returns true if group expanding is enabled

Return Value

bool

Returns TRUE if group expanding is enabled

array getExpandFilterQueries()

(PECL solr >= 2.2.0)
Returns the expand filter queries

Return Value

array

Returns the expand filter queries

array getExpandQuery()

(PECL solr >= 2.2.0)
Returns the expand query expand.q parameter

Return Value

array

Returns the expand query expand.q parameter

int getExpandRows()

(PECL solr >= 2.2.0)
Returns The number of rows to display in each group (expand.rows)

Return Value

int

Returns The number of rows to display in each group (expand.rows)

array getExpandSortFields()

(PECL solr >= 2.2.0)
Returns an array of fields

Return Value

array

Returns an array of fields

bool|null getFacet()

(PECL solr >= 0.9.2)
Returns the value of the facet parameter

Return Value

bool|null

Returns a boolean on success and NULL if not set

string|null getFacetDateEnd(string $field_override)

(PECL solr >= 0.9.2)
Returns the value for the facet.date.end parameter

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

array|null getFacetDateFields()

(PECL solr >= 0.9.2)
Returns all the facet.date fields

Return Value

array|null

Returns all the facet.date fields as an array or NULL if none was set

string|null getFacetDateGap(string $field_override)

(PECL solr >= 0.9.2)
Returns the value of the facet.date.gap parameter

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

string|null getFacetDateHardEnd(string $field_override)

(PECL solr >= 0.9.2)
Returns the value of the facet.date.hardend parameter

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

array|null getFacetDateOther(string $field_override)

(PECL solr >= 0.9.2)
Returns the value for the facet.date.other parameter

Parameters

string $field_override

[optional]

The name of the field

Return Value

array|null

Returns an array on success and NULL if not set

string|null getFacetDateStart(string $field_override)

(PECL solr >= 0.9.2)
Returns the lower bound for the first date range for all date faceting on this field

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

array|null getFacetFields()

(PECL solr >= 0.9.2)
Returns all the facet fields

Return Value

array|null

Returns an array of all the fields and NULL if none was set

int|null getFacetLimit(string $field_override)

(PECL solr >= 0.9.2)
Returns the maximum number of constraint counts that should be returned for the facet fields

Parameters

string $field_override

[optional]

The name of the field

Return Value

int|null

Returns an integer on success and NULL if not set

string|null getFacetMethod(string $field_override)

(PECL solr >= 0.9.2)
Returns the value of the facet.method parameter

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

int|null getFacetMinCount(string $field_override)

(PECL solr >= 0.9.2)
Returns the minimum counts for facet fields should be included in the response

Parameters

string $field_override

[optional]

The name of the field

Return Value

int|null

Returns an integer on success and NULL if not set

string|null getFacetMissing(string $field_override)

(PECL solr >= 0.9.2)
Returns the current state of the facet.missing parameter

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a boolean on success and NULL if not set

int|null getFacetOffset(string $field_override)

(PECL solr >= 0.9.2)
Returns an offset into the list of constraints to be used for pagination

Parameters

string $field_override

[optional]

The name of the field

Return Value

int|null

Returns an integer on success and NULL if not set

string|null getFacetPrefix(string $field_override)

(PECL solr >= 0.9.2)
Returns the facet prefix

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

string|null getFacetQueries()

(PECL solr >= 0.9.2)
Returns all the facet queries

Return Value

string|null

Returns an array on success and NULL if not set

int|null getFacetSort(string $field_override)

(PECL solr >= 0.9.2)
Returns the facet sort type

Parameters

string $field_override

[optional]

The name of the field

Return Value

int|null

Returns an integer (SolrQuery::FACET_SORT_INDEX or SolrQuery::FACET_SORT_COUNT) on success or NULL if not set.

string|null getFields()

(PECL solr >= 0.9.2)
Returns the list of fields that will be returned in the response

Return Value

string|null

Returns an array on success and NULL if not set

string|null getFilterQueries()

(PECL solr >= 0.9.2)
Returns an array of filter queries

Return Value

string|null

Returns an array on success and NULL if not set

bool getGroup()

(PECL solr >= 2.2.0)
Returns true if grouping is enabled https://secure.php.net/manual/en/solrquery.getgroup.php

Return Value

bool

Returns true if grouping is enabled

int getGroupCachePercent()

(PECL solr >= 2.2.0)
Returns group cache percent value

Return Value

int

Returns group cache percent value

bool getGroupFacet()

(PECL solr >= 2.2.0)
Returns the group.facet parameter value

Return Value

bool

Returns the group.facet parameter value

array getGroupFields()

(PECL solr >= 2.2.0)
Returns group fields (group.field parameter values)

Return Value

array

Returns group fields (group.field parameter values)

string getGroupFormat()

(PECL solr >= 2.2.0)
Returns the group.format value

Return Value

string

Returns the group.format value

array getGroupFunctions()

(PECL solr >= 2.2.0)
Returns group functions (group.func parameter values)

Return Value

array

Returns group functions (group.func parameter values)

int getGroupLimit()

(PECL solr >= 2.2.0)
Returns the group.limit value

Return Value

int

Returns the group.limit value

bool getGroupMain()

(PECL solr >= 2.2.0)
Returns the group.main value

Return Value

bool

Returns the group.main value

bool getGroupNGroups()

(PECL solr >= 2.2.0)
Returns the group.ngroups value

Return Value

bool

Returns the group.ngroups value

bool getGroupOffset()

(PECL solr >= 2.2.0)
Returns the group.offset value

Return Value

bool

Returns the group.offset value

array getGroupQueries()

(PECL solr >= 2.2.0)
Returns all the group.query parameter values

Return Value

array

Returns all the group.query parameter values

array getGroupSortFields()

(PECL solr >= 2.2.0)
Returns the group.sort value

Return Value

array

Returns all the group.sort parameter values

bool getGroupTruncate()

(PECL solr >= 2.2.0)
Returns the group.truncate value

Return Value

bool

Returns the group.truncate value

bool getHighlight()

(PECL solr >= 0.9.2)
Returns the state of the hl parameter

Return Value

bool

Returns the state of the hl parameter

string|null getHighlightAlternateField(string $field_override)

(PECL solr >= 0.9.2)
Returns the highlight field to use as backup or default

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

array|null getHighlightFields()

(PECL solr >= 0.9.2)
Returns all the fields that Solr should generate highlighted snippets for

Return Value

array|null

Returns an array on success and NULL if not set

string|null getHighlightFormatter(string $field_override)

(PECL solr >= 0.9.2)
Returns the formatter for the highlighted output

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

string|null getHighlightFragmenter(string $field_override)

(PECL solr >= 0.9.2)
Returns the text snippet generator for highlighted text

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

int|null getHighlightFragsize(string $field_override)

(PECL solr >= 0.9.2)
Returns the number of characters of fragments to consider for highlighting

Parameters

string $field_override

[optional]

The name of the field

Return Value

int|null

Returns an integer on success and NULL if not set

bool|null getHighlightHighlightMultiTerm()

(PECL solr >= 0.9.2)
Returns whether or not to enable highlighting for range/wildcard/fuzzy/prefix queries

Return Value

bool|null

Returns a boolean on success and NULL if not set

int|null getHighlightMaxAlternateFieldLength(string $field_override)

(PECL solr >= 0.9.2)
Returns the maximum number of characters of the field to return

Parameters

string $field_override

[optional]

The name of the field

Return Value

int|null

Returns an integer on success and NULL if not set

int|null getHighlightMaxAnalyzedChars()

(PECL solr >= 0.9.2)
Returns the maximum number of characters into a document to look for suitable snippets

Return Value

int|null

Returns an integer on success and NULL if not set

bool|null getHighlightMergeContiguous(string $field_override)

(PECL solr >= 0.9.2)
Returns whether or not the collapse contiguous fragments into a single fragment

Parameters

string $field_override

[optional]

The name of the field

Return Value

bool|null

Returns a boolean on success and NULL if not set

int|null getHighlightRegexMaxAnalyzedChars()

(PECL solr >= 0.9.2)
Returns the maximum number of characters from a field when using the regex fragmenter

Return Value

int|null

Returns an integer on success and NULL if not set

string getHighlightRegexPattern()

(PECL solr >= 0.9.2)
Returns the regular expression for fragmenting

Return Value

string

Returns a string on success and NULL if not set

float|null getHighlightRegexSlop()

(PECL solr >= 0.9.2)
Returns the deviation factor from the ideal fragment size

Return Value

float|null

Returns a double on success and NULL if not set.

bool|null getHighlightRequireFieldMatch()

(PECL solr >= 0.9.2)
Returns if a field will only be highlighted if the query matched in this particular field

Return Value

bool|null

Returns a boolean on success and NULL if not set

string|null getHighlightSimplePost(string $field_override)

(PECL solr >= 0.9.2)
Returns the text which appears after a highlighted term

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

string|null getHighlightSimplePre(string $field_override)

(PECL solr >= 0.9.2)
Returns the text which appears before a highlighted term

Parameters

string $field_override

[optional]

The name of the field

Return Value

string|null

Returns a string on success and NULL if not set

int|null getHighlightSnippets(string $field_override)

(PECL solr >= 0.9.2)
Returns the maximum number of highlighted snippets to generate per field

Parameters

string $field_override

[optional]

The name of the field

Return Value

int|null

Returns an integer on success and NULL if not set

bool|null getHighlightUsePhraseHighlighter()

(PECL solr >= 0.9.2)
Returns the state of the hl.usePhraseHighlighter parameter

Return Value

bool|null

Returns a boolean on success and NULL if not set

bool|null getMlt()

(PECL solr >= 0.9.2)
Returns whether or not MoreLikeThis results should be enabled

Return Value

bool|null

Returns a boolean on success and NULL if not set

bool|null getMltBoost()

(PECL solr >= 0.9.2)
Returns whether or not the query will be boosted by the interesting term relevance

Return Value

bool|null

Returns a boolean on success and NULL if not set

int|null getMltCount()

(PECL solr >= 0.9.2)
Returns the number of similar documents to return for each result

Return Value

int|null

Returns an integer on success and NULL if not set

array getMltFields()

(PECL solr >= 0.9.2)
Returns all the fields to use for similarity

Return Value

array

Returns an array on success and NULL if not set

int|null getMltMaxNumQueryTerms()

(PECL solr >= 0.9.2)
Returns the maximum number of query terms that will be included in any generated query

Return Value

int|null

Returns an integer on success and NULL if not set

int getMltMaxNumTokens()

(PECL solr >= 0.9.2)
Returns the maximum number of tokens to parse in each document field that is not stored with TermVector support

Return Value

int

Returns an integer on success and NULL if not set

int|null getMltMaxWordLength()

(PECL solr >= 0.9.2)
Returns the maximum word length above which words will be ignored

Return Value

int|null

Returns an integer on success and NULL if not set

int|null getMltMinDocFrequency()

(PECL solr >= 0.9.2)
Returns the threshold frequency at which words will be ignored which do not occur in at least this many docs

Return Value

int|null

Returns an integer on success and NULL if not set

int|null getMltMinTermFrequency()

(PECL solr >= 0.9.2)
Returns the frequency below which terms will be ignored in the source document

Return Value

int|null

Returns an integer on success and NULL if not set

int getMltMinWordLength()

(PECL solr >= 0.9.2)
Returns the minimum word length below which words will be ignored

Return Value

int

Returns an integer on success and NULL if not set

array|null getMltQueryFields()

(PECL solr >= 0.9.2)
Returns the query fields and their boosts

Return Value

array|null

Returns an array on success and NULL if not set

string getQuery()

(PECL solr >= 0.9.2)
Returns the main query

Return Value

string

Returns a string on success and NULL if not set

int|null getRows()

(PECL solr >= 0.9.2)
Returns the maximum number of documents

Return Value

int|null

Returns an integer on success and NULL if not set

array getSortFields()

(PECL solr >= 0.9.2)
Returns all the sort fields

Return Value

array

Returns an array on success and NULL if none of the parameters was set.

int|null getStart()

(PECL solr >= 0.9.2)
Returns the offset in the complete result set

Return Value

int|null

Returns an integer on success and NULL if not set

bool|null getStats()

(PECL solr >= 0.9.2)
Returns whether or not stats is enabled

Return Value

bool|null

Returns a boolean on success and NULL if not set

array|null getStatsFacets()

(PECL solr >= 0.9.2)
Returns all the stats facets that were set

Return Value

array|null

Returns an array on success and NULL if not set

array|null getStatsFields()

(PECL solr >= 0.9.2)
Returns all the statistics fields

Return Value

array|null

Returns an array on success and NULL if not set

bool|null getTerms()

(PECL solr >= 0.9.2)
Returns whether or not the TermsComponent is enabled

Return Value

bool|null

Returns a boolean on success and NULL if not set

string|null getTermsField()

(PECL solr >= 0.9.2)
Returns the field from which the terms are retrieved

Return Value

string|null

Returns a string on success and NULL if not set

bool|null getTermsIncludeLowerBound()

(PECL solr >= 0.9.2)
Returns whether or not to include the lower bound in the result set

Return Value

bool|null

Returns a boolean on success and NULL if not set

bool|null getTermsIncludeUpperBound()

(PECL solr >= 0.9.2)
Returns whether or not to include the upper bound term in the result set

Return Value

bool|null

Returns a boolean on success and NULL if not set

int|null getTermsLimit()

(PECL solr >= 0.9.2)
Returns the maximum number of terms Solr should return

Return Value

int|null

Returns an integer on success and NULL if not set

string|null getTermsLowerBound()

(PECL solr >= 0.9.2)
Returns the term to start at

Return Value

string|null

Returns a string on success and NULL if not set

int|null getTermsMaxCount()

(PECL solr >= 0.9.2)
Returns the maximum document frequency

Return Value

int|null

Returns an integer on success and NULL if not set

int|null getTermsMinCount()

(PECL solr >= 0.9.2)
Returns the minimum document frequency to return in order to be included

Return Value

int|null

Returns an integer on success and NULL if not set

string|null getTermsPrefix()

(PECL solr >= 0.9.2)
Returns the term prefix

Return Value

string|null

Returns a string on success and NULL if not set

bool|null getTermsReturnRaw()

(PECL solr >= 0.9.2)
Whether or not to return raw characters

Return Value

bool|null

Returns a boolean on success and NULL if not set

int|null getTermsSort()

(PECL solr >= 0.9.2)
Returns an integer indicating how terms are sorted

Return Value

int|null

Returns an integer on success and NULL if not set
SolrQuery::TERMS_SORT_INDEX indicates that the terms are returned by index order.
SolrQuery::TERMS_SORT_COUNT implies that the terms are sorted by term frequency (highest count first)

string|null getTermsUpperBound()

(PECL solr >= 0.9.2)
Returns the term to stop at

Return Value

string|null

Returns a string on success and NULL if not set

int|null getTimeAllowed()

(PECL solr >= 0.9.2)
Returns the time in milliseconds allowed for the query to finish

Return Value

int|null

Returns an integer on success and NULL if not set

SolrQuery removeExpandFilterQuery(string $fq)

(PECL solr >= 2.2.0)
Removes an expand filter query

Parameters

string $fq

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeExpandSortField(string $field)

(PECL solr >= 2.2.0)
Removes an expand sort field from the expand.sort parameter.

Parameters

string $field

Field name

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeFacetDateField(string $field)

(PECL solr >= 0.9.2)
Removes one of the facet date fields

Parameters

string $field

The name of the date field to remove

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeFacetDateOther(string $value, string $field_override)

(PECL solr >= 0.9.2)
Removes one of the facet.date.other parameters

Parameters

string $value

The value

string $field_override

[optional]

The name of the field.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeFacetField(string $field)

(PECL solr >= 0.9.2)
Removes one of the facet.date parameters

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeFacetQuery(string $value)

(PECL solr >= 0.9.2)
Removes one of the facet.query parameters

Parameters

string $value

The value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeField(string $field)

(PECL solr >= 0.9.2)
Removes a field from the list of fields

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeFilterQuery(string $fq)

(PECL solr >= 0.9.2)
Removes a filter query

Parameters

string $fq

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeHighlightField(string $field)

(PECL solr >= 0.9.2)
Removes one of the fields used for highlighting

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeMltField(string $field)

(PECL solr >= 0.9.2)
Removes one of the moreLikeThis fields

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeMltQueryField(string $queryField)

(PECL solr >= 0.9.2)
Removes one of the moreLikeThis query fields

Parameters

string $queryField

The query field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeSortField(string $field)

(PECL solr >= 0.9.2)
Removes one of the sort fields

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeStatsFacet(string $value)

(PECL solr >= 0.9.2)
Removes one of the stats.facet parameters

Parameters

string $value

The value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery removeStatsField(string $field)

(PECL solr >= 0.9.2)
Removes one of the stats.field parameters

Parameters

string $field

The name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setEchoHandler(bool $flag)

(PECL solr >= 0.9.2)
Toggles the echoHandler parameter

Parameters

bool $flag

TRUE or FALSE

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setEchoParams(string $type)

(PECL solr >= 0.9.2)
Determines what kind of parameters to include in the response

Parameters

string $type

The type of parameters to include:

  • none: don't include any request parameters for debugging
  • explicit: include the parameters explicitly specified by the client in the request
  • all: include all parameters involved in this request, either specified explicitly by the client, or implicit because of the request handler configuration.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setExpand(bool $value)

(PECL solr >= 2.2.0)
Enables/Disables the Expand Component

Parameters

bool $value

Bool flag

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setExpandQuery(string $q)

(PECL solr >= 2.2.0)
Sets the expand.q parameter

Parameters

string $q

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setExpandRows(int $value)

(PECL solr >= 2.2.0)
Sets the number of rows to display in each group (expand.rows). Server Default 5

Parameters

int $value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setExplainOther(string $query)

(PECL solr >= 0.9.2)
Sets the explainOther common query parameter

Parameters

string $query

The Lucene query to identify a set of documents

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacet(bool $flag)

(PECL solr >= 0.9.2)
Maps to the facet parameter. Enables or disables facetting

Parameters

bool $flag

TRUE enables faceting and FALSE disables it.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetDateEnd(string $value, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.date.end

Parameters

string $value

See facet.date.end

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetDateGap(string $value, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.date.gap

Parameters

string $value

See facet.date.gap

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetDateHardEnd(bool $value, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.date.hardend

Parameters

bool $value

See facet.date.hardend

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetDateStart(string $value, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.date.start

Parameters

string $value

See facet.date.start

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetEnumCacheMinDefaultFrequency(int $frequency, string $field_override)

(PECL solr >= 0.9.2)
Sets the minimum document frequency used for determining term count

Parameters

int $frequency

The minimum frequency

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetLimit(int $limit, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.limit

Parameters

int $limit

The maximum number of constraint counts

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetMethod(string $method, string $field_override)

(PECL solr >= 0.9.2)
Specifies the type of algorithm to use when faceting a field

Parameters

string $method

The method to use.

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetMinCount(int $mincount, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.mincount

Parameters

int $mincount

The minimum count

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetMissing(bool $flag, string $field_override)

(PECL solr >= 0.9.2)
Maps to facet.missing

Parameters

bool $flag

TRUE turns this feature on. FALSE disables it.

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetOffset(int $offset, string $field_override)

(PECL solr >= 0.9.2)
Sets the offset into the list of constraints to allow for pagination

Parameters

int $offset

The offset

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetPrefix(string $prefix, string $field_override)

(PECL solr >= 0.9.2)
Specifies a string prefix with which to limits the terms on which to facet

Parameters

string $prefix

The prefix string

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setFacetSort(int $facetSort, string $field_override)

(PECL solr >= 0.9.2)
Determines the ordering of the facet field constraints

Parameters

int $facetSort

Use SolrQuery::FACET_SORT_INDEX for sorting by index order or SolrQuery::FACET_SORT_COUNT for sorting by count.

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setGroup(bool $value)

(PECL solr >= 2.2.0)
Enable/Disable result grouping (group parameter)

Parameters

bool $value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setGroupCachePercent(int $percent)

(PECL solr >= 2.2.0)
Enables caching for result grouping

Parameters

int $percent

Setting this parameter to a number greater than 0 enables caching for result grouping. Result Grouping executes two searches; this option caches the second search. The server default value is 0. Testing has shown that group caching only improves search time with Boolean, wildcard, and fuzzy queries. For simple queries like term or "match all" queries, group caching degrades performance. group.cache.percent parameter.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setGroupFacet(bool $value)

(PECL solr >= 2.2.0)
Sets group.facet parameter

Parameters

bool $value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setGroupFormat(string $value)

(PECL solr >= 2.2.0)
Sets the group format, result structure (group.format parameter).

Parameters

string $value

Sets the group.format parameter. If this parameter is set to simple, the grouped documents are presented in a single flat list, and the start and rows parameters affect the numbers of documents instead of groups.
Accepts: grouped/simple

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setGroupLimit(int $value)

(PECL solr >= 2.2.0)
Specifies the number of results to return for each group. The server default value is 1.

Parameters

int $value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setGroupMain(string $value)

(PECL solr >= 2.2.0)
If true, the result of the first field grouping command is used as the main result list in the response, using group.format=simple.

Parameters

string $value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setGroupNGroups(bool $value)

(PECL solr >= 2.2.0)
If true, Solr includes the number of groups that have matched the query in the results.

Parameters

bool $value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setGroupOffset(int $value)

(PECL solr >= 2.2.0)
Sets the group.offset parameter.

Parameters

int $value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setGroupTruncate(bool $value)

(PECL solr >= 2.2.0)
If true, facet counts are based on the most relevant document of each group matching the query.

Parameters

bool $value

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlight(bool $flag)

(PECL solr >= 0.9.2)
Enables or disables highlighting

Parameters

bool $flag

Setting it to TRUE enables highlighted snippets to be generated in the query response.
Setting it to FALSE disables highlighting

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightAlternateField(string $field, string $field_override)

(PECL solr >= 0.9.2)
Specifies the backup field to use

Parameters

string $field

The name of the backup field

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightFormatter(string $formatter, string $field_override)

(PECL solr >= 0.9.2)
Specify a formatter for the highlight output

Parameters

string $formatter

Currently the only legal value is "simple"

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightFragmenter(string $fragmenter, string $field_override)

(PECL solr >= 0.9.2)
Sets a text snippet generator for highlighted text

Parameters

string $fragmenter

The standard fragmenter is gap. Another option is regex, which tries to create fragments that resembles a certain regular expression

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightFragsize(int $size, string $field_override)

(PECL solr >= 0.9.2)
The size of fragments to consider for highlighting

Parameters

int $size

The size, in characters, of fragments to consider for highlighting

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightHighlightMultiTerm(bool $flag)

(PECL solr >= 0.9.2)
Use SpanScorer to highlight phrase terms

Parameters

bool $flag

Whether or not to use SpanScorer to highlight phrase terms only when they appear within the query phrase in the document.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightMaxAlternateFieldLength(int $fieldLength, string $field_override)

(PECL solr >= 0.9.2)
Sets the maximum number of characters of the field to return

Parameters

int $fieldLength

The length of the field

If SolrQuery::setHighlightAlternateField() was passed the value TRUE, this parameter specifies the maximum number of characters of the field to return

Any value less than or equal to 0 means unlimited.

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightMaxAnalyzedChars(int $value)

(PECL solr >= 0.9.2)
Specifies the number of characters into a document to look for suitable snippets

Parameters

int $value

The number of characters into a document to look for suitable snippets

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightMergeContiguous(bool $flag, string $field_override)

(PECL solr >= 0.9.2)
Whether or not to collapse contiguous fragments into a single fragment

Parameters

bool $flag

Whether or not to collapse contiguous fragments into a single fragment

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightRegexMaxAnalyzedChars(int $maxAnalyzedChars)

(PECL solr >= 0.9.2)
Specify the maximum number of characters to analyze

Parameters

int $maxAnalyzedChars

The maximum number of characters to analyze from a field when using the regex fragmenter

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightRegexPattern(string $value)

(PECL solr >= 0.9.2)
Specify the regular expression for fragmenting

Parameters

string $value

The regular expression for fragmenting. This could be used to extract sentences

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightRegexSlop(float $factor)

(PECL solr >= 0.9.2)
Sets the factor by which the regex fragmenter can stray from the ideal fragment size

Parameters

float $factor

The factor by which the regex fragmenter can stray from the ideal fragment size (specified by SolrQuery::setHighlightFragsize) to accommodate the regular expression.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightRequireFieldMatch(bool $flag)

(PECL solr >= 0.9.2)
Require field matching during highlighting

Parameters

bool $flag

If TRUE, then a field will only be highlighted if the query matched in this particular field.
This will only work if SolrQuery::setHighlightUsePhraseHighlighter() was set to TRUE.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightSimplePost(string $simplePost, string $field_override)

(PECL solr >= 0.9.2)
Sets the text which appears after a highlighted term

Parameters

string $simplePost

Sets the text which appears after a highlighted term. The default is </em>

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightSimplePre(string $simplePre, string $field_override)

(PECL solr >= 0.9.2)
Sets the text which appears before a highlighted term

Parameters

string $simplePre

Sets the text which appears before a highlighted term. The default is <em>

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightSnippets(int $value, string $field_override)

(PECL solr >= 0.9.2)
Sets the maximum number of highlighted snippets to generate per field

Parameters

int $value

The maximum number of highlighted snippets to generate per field

string $field_override

[optional]

Name of the field

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setHighlightUsePhraseHighlighter(bool $flag)

(PECL solr >= 0.9.2)
Whether to highlight phrase terms only when they appear within the query phrase

Parameters

bool $flag

Whether or not to use SpanScorer to highlight phrase terms only when they appear within the query phrase in the document.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setMlt(bool $flag)

(PECL solr >= 0.9.2)
Enables or disables moreLikeThis

Parameters

bool $flag

TRUE enables it and FALSE turns it off.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setMltBoost(bool $flag)

(PECL solr >= 0.9.2)
Set if the query will be boosted by the interesting term relevance

Parameters

bool $flag

Sets to TRUE or FALSE

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setMltCount(int $count)

(PECL solr >= 0.9.2)
Set the number of similar documents to return for each result

Parameters

int $count

The number of similar documents to return for each result

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setMltMaxNumQueryTerms(int $value)

(PECL solr >= 0.9.2)
Sets the maximum number of query terms included

Parameters

int $value

The maximum number of query terms that will be included in any generated query

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setMltMaxNumTokens(int $value)

(PECL solr >= 0.9.2)
Specifies the maximum number of tokens to parse

Parameters

int $value

The maximum number of tokens to parse

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setMltMaxWordLength(int $maxWordLength)

(PECL solr >= 0.9.2)
Sets the maximum word length

Parameters

int $maxWordLength

The maximum word length above which words will be ignored

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setMltMinDocFrequency(int $minDocFrequency)

(PECL solr >= 0.9.2)
Sets the mltMinDoc frequency

Parameters

int $minDocFrequency

Sets the frequency at which words will be ignored which do not occur in at least this many docs.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setMltMinTermFrequency(int $minTermFrequency)

(PECL solr >= 0.9.2)
Sets the frequency below which terms will be ignored in the source docs

Parameters

int $minTermFrequency

The frequency below which terms will be ignored in the source docs

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setMltMinWordLength(int $minWordLength)

(PECL solr >= 0.9.2)
Sets the minimum word length

Parameters

int $minWordLength

The minimum word length below which words will be ignored

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setOmitHeader(bool $flag)

(PECL solr >= 0.9.2)
Exclude the header from the returned results

Parameters

bool $flag

TRUE excludes the header from the result.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setQuery(string $query)

(PECL solr >= 0.9.2)
Sets the search query

Parameters

string $query

The search query

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setRows(int $rows)

(PECL solr >= 0.9.2)
Specifies the maximum number of rows to return in the result

Parameters

int $rows

The maximum number of rows to return

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setShowDebugInfo(bool $flag)

(PECL solr >= 0.9.2)
Flag to show debug information

Parameters

bool $flag

Whether to show debug info. TRUE or FALSE

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setStart(int $start)

(PECL solr >= 0.9.2)
Specifies the number of rows to skip

Parameters

int $start

The number of rows to skip.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setStats(bool $flag)

(PECL solr >= 0.9.2)
Enables or disables the Stats component

Parameters

bool $flag

TRUE turns on the stats component and FALSE disables it.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTerms(bool $flag)

(PECL solr >= 0.9.2)
Enables or disables the TermsComponent

Parameters

bool $flag

TRUE enables it. FALSE turns it off

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsField(string $fieldname)

(PECL solr >= 0.9.2)
Sets the name of the field to get the Terms from

Parameters

string $fieldname

The field name

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsIncludeLowerBound(bool $flag)

(PECL solr >= 0.9.2)
Include the lower bound term in the result set

Parameters

bool $flag

Include the lower bound term in the result set

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsIncludeUpperBound(bool $flag)

(PECL solr >= 0.9.2)
Include the upper bound term in the result set

Parameters

bool $flag

TRUE or FALSE

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsLimit(int $limit)

(PECL solr >= 0.9.2)
Sets the maximum number of terms to return

Parameters

int $limit

The maximum number of terms to return. All the terms will be returned if the limit is negative.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsLowerBound(string $lowerBound)

(PECL solr >= 0.9.2)
Specifies the Term to start from

Parameters

string $lowerBound

The lower bound Term

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsMaxCount(int $frequency)

(PECL solr >= 0.9.2)
Sets the maximum document frequency

Parameters

int $frequency

The maximum document frequency.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsMinCount(int $frequency)

(PECL solr >= 0.9.2)
Sets the minimum document frequency

Parameters

int $frequency

The minimum frequency

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsPrefix(string $prefix)

(PECL solr >= 0.9.2)
Restrict matches to terms that start with the prefix

Parameters

string $prefix

Restrict matches to terms that start with the prefix

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsReturnRaw(bool $flag)

(PECL solr >= 0.9.2)
Return the raw characters of the indexed term

Parameters

bool $flag

TRUE or FALSE

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsSort(int $sortType)

(PECL solr >= 0.9.2)
Specifies how to sort the returned terms

Parameters

int $sortType

If SolrQuery::TERMS_SORT_COUNT, sorts the terms by the term frequency (highest count first).
If SolrQuery::TERMS_SORT_INDEX, returns the terms in index order

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTermsUpperBound(string $upperBound)

(PECL solr >= 0.9.2)
Sets the term to stop at

Parameters

string $upperBound

The term to stop at

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrQuery setTimeAllowed(int $timeAllowed)

(PECL solr >= 0.9.2)
The time allowed for search to finish

Parameters

int $timeAllowed

The time allowed for a search to finish. This value only applies to the search and not to requests in general. Time is in milliseconds. Values less than or equal to zero implies no time restriction. Partial results may be returned, if there are any.

Return Value

SolrQuery

Returns the current SolrQuery object, if the return value is used.

SolrDisMaxQuery addBigramPhraseField(string $field, string $boost, string $slop)

(PECL solr >= 2.1.0)
Adds a Phrase Bigram Field (pf2 parameter)

Parameters

string $field

Field name

string $boost

[optional]

Boost value. Boosts documents with matching terms.

string $slop

[optional]

Field Slop

Return Value

SolrDisMaxQuery

SolrDisMaxQuery addBoostQuery(string $field, string $value, string $boost)

(PECL solr >= 2.1.0)
Adds a boost query field with value and optional boost (bq parameter)

Parameters

string $field

Field name

string $value
string $boost

[optional]

Boost value. Boosts documents with matching terms.

Return Value

SolrDisMaxQuery

SolrDisMaxQuery addPhraseField(string $field, string $boost, string $slop)

(PECL solr >= 2.1.0)
Adds a Phrase Field (pf parameter)

Parameters

string $field

Field name

string $boost

[optional]

Boost value. Boosts documents with matching terms.

string $slop

[optional]

Field Slop

Return Value

SolrDisMaxQuery

SolrDisMaxQuery addQueryField(string $field, string $boost)

(PECL solr >= 2.1.0)
Add a query field with optional boost (qf parameter)

Parameters

string $field

Field name

string $boost

[optional]

Boost value. Boosts documents with matching terms.

Return Value

SolrDisMaxQuery

SolrDisMaxQuery addTrigramPhraseField(string $field, string $boost, string $slop)

(PECL solr >= 2.1.0)
Adds a Trigram Phrase Field (pf3 parameter)

Parameters

string $field

Field name

string $boost

[optional]

Boost value. Boosts documents with matching terms.

string $slop

[optional]

Field Slop

Return Value

SolrDisMaxQuery

SolrDisMaxQuery addUserField(string $field)

(PECL solr >= 2.1.0)
Adds a field to User Fields Parameter (uf)

Parameters

string $field

Field name

Return Value

SolrDisMaxQuery

SolrDisMaxQuery removeBigramPhraseField(string $field)

(PECL solr >= 2.1.0)
Removes phrase bigram field (pf2 parameter)

Parameters

string $field

Field name

Return Value

SolrDisMaxQuery

SolrDisMaxQuery removeBoostQuery(string $field)

(PECL solr >= 2.1.0)
Removes a boost query partial by field name (bq)

Parameters

string $field

Field name

Return Value

SolrDisMaxQuery

SolrDisMaxQuery removePhraseField(string $field)

(PECL solr >= 2.1.0)
Removes a Phrase Field (pf parameter)

Parameters

string $field

Field name

Return Value

SolrDisMaxQuery

SolrDisMaxQuery removeQueryField(string $field)

(PECL solr >= 2.1.0)
Removes a Query Field (qf parameter)

Parameters

string $field

Field name

Return Value

SolrDisMaxQuery

SolrDisMaxQuery removeTrigramPhraseField(string $field)

(PECL solr >= 2.1.0)
Removes a Trigram Phrase Field (pf3 parameter)

Parameters

string $field

Field name

Return Value

SolrDisMaxQuery

SolrDisMaxQuery removeUserField(string $field)

(PECL solr >= 2.1.0)
Removes a field from The User Fields Parameter (uf)

Warning
This function is currently not documented; only its argument list is available.

Parameters

string $field

Field name

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setBigramPhraseFields(string $fields)

(PECL solr >= 2.1.0)
Sets Bigram Phrase Fields and their boosts (and slops) using pf2 parameter

Parameters

string $fields

Fields boosts (slops)

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setBigramPhraseSlop(string $slop)

(PECL solr >= 2.1.0)
Sets Bigram Phrase Slop (ps2 parameter)

Parameters

string $slop

A default slop for Bigram phrase fields.

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setBoostFunction(string $function)

(PECL solr >= 2.1.0)
Sets a Boost Function (bf parameter).

Parameters

string $function

Functions (with optional boosts) that will be included in the user's query to influence the score. Any function supported natively by Solr can be used, along with a boost value. e.g.:
recip(rord(myfield),1,2,3)^1.5

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setBoostQuery(string $q)

(PECL solr >= 2.1.0)
Directly Sets Boost Query Parameter (bq)

Parameters

string $q

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setMinimumMatch(string $value)

(PECL solr >= 2.1.0)
Set Minimum "Should" Match (mm)

Parameters

string $value

Minimum match value/expression
Set Minimum "Should" Match parameter (mm). If the default query operator is AND then mm=100%, if the default query operator (q.op) is OR, then mm=0%.

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setPhraseFields(string $fields)

(PECL solr >= 2.1.0)
Sets Phrase Fields and their boosts (and slops) using pf2 parameter

Parameters

string $fields

Fields, boosts [, slops]

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setPhraseSlop(string $slop)

(PECL solr >= 2.1.0)
Sets the default slop on phrase queries (ps parameter)

Parameters

string $slop

Sets the default amount of slop on phrase queries built with "pf", "pf2" and/or "pf3" fields (affects boosting). "ps" parameter

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setQueryAlt(string $q)

(PECL solr >= 2.1.0)
Set Query Alternate (q.alt parameter)

Parameters

string $q

Query String

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setQueryPhraseSlop(string $slop)

(PECL solr >= 2.1.0)
Specifies the amount of slop permitted on phrase queries explicitly included in the user's query string (qf parameter)

Parameters

string $slop

Amount of slop
The Query Phrase Slop is the amount of slop permitted on phrase queries explicitly included in the user's query string with the qf parameter.

slop refers to the number of positions one token needs to be moved in relation to another token in order to match a phrase specified in a query.

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setTieBreaker(string $tieBreaker)

(PECL solr >= 2.1.0)
Sets Tie Breaker parameter (tie parameter)

Parameters

string $tieBreaker

The tie parameter specifies a float value (which should be something much less than 1) to use as tiebreaker in DisMax queries.

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setTrigramPhraseFields(string $fields)

(PECL solr >= 2.1.0)
Directly Sets Trigram Phrase Fields (pf3 parameter)

Parameters

string $fields

Trigram Phrase Fields

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setTrigramPhraseSlop(string $slop)

(PECL solr >= 2.1.0)
Sets Trigram Phrase Slop (ps3 parameter)

Parameters

string $slop

Phrase slop

Return Value

SolrDisMaxQuery

SolrDisMaxQuery setUserFields(string $fields)

(PECL solr >= 2.1.0)
Sets User Fields parameter (uf)

Parameters

string $fields

Fields names separated by space
This parameter supports wildcards.

Return Value

SolrDisMaxQuery

SolrDisMaxQuery useDisMaxQueryParser()

(PECL solr >= 2.1.0)
Switch QueryParser to be DisMax Query Parser

Return Value

SolrDisMaxQuery

SolrDisMaxQuery useEDisMaxQueryParser()

(PECL solr >= 2.1.0)
Switch QueryParser to be EDisMax
By default the query builder uses edismax, if it was switched using SolrDisMaxQuery::useDisMaxQueryParser(), it can be switched back using this method.

Return Value

SolrDisMaxQuery