The SolrQuery class

(PECL solr >= 0.9.2)

Introduction

Represents a collection of name-value pairs sent to the Solr server during a request.

Class synopsis

class SolrQuery extends SolrModifiableParams implements Serializable {
/* Constants */
const int ORDER_ASC = 0;
const int ORDER_DESC = 1;
const int FACET_SORT_INDEX = 0;
const int FACET_SORT_COUNT = 1;
const int TERMS_SORT_INDEX = 0;
const int TERMS_SORT_COUNT = 1;
/* Properties */
/* Methods */
public __construct(string $q = ?)
public addExpandFilterQuery(string $fq): SolrQuery
public addExpandSortField(string $field, string $order = ?): SolrQuery
public addFacetDateField(string $dateField): SolrQuery
public addFacetDateOther(string $value, string $field_override = ?): SolrQuery
public addFacetField(string $field): SolrQuery
public addFacetQuery(string $facetQuery): SolrQuery
public addField(string $field): SolrQuery
public addFilterQuery(string $fq): SolrQuery
public addGroupField(string $value): SolrQuery
public addGroupFunction(string $value): SolrQuery
public addGroupQuery(string $value): SolrQuery
public addGroupSortField(string $field, int $order = ?): SolrQuery
public addHighlightField(string $field): SolrQuery
public addMltField(string $field): SolrQuery
public addMltQueryField(string $field, float $boost): SolrQuery
public addSortField(string $field, int $order = SolrQuery::ORDER_DESC): SolrQuery
public addStatsFacet(string $field): SolrQuery
public addStatsField(string $field): SolrQuery
public collapse(SolrCollapseFunction $collapseFunction): SolrQuery
public getExpand(): bool
public getExpandFilterQueries(): array
public getExpandQuery(): array
public getExpandRows(): int
public getExpandSortFields(): array
public getFacet(): bool
public getFacetDateEnd(string $field_override = ?): string
public getFacetDateFields(): array
public getFacetDateGap(string $field_override = ?): string
public getFacetDateHardEnd(string $field_override = ?): string
public getFacetDateOther(string $field_override = ?): array
public getFacetDateStart(string $field_override = ?): string
public getFacetFields(): array
public getFacetLimit(string $field_override = ?): int
public getFacetMethod(string $field_override = ?): string
public getFacetMinCount(string $field_override = ?): int
public getFacetMissing(string $field_override = ?): bool
public getFacetOffset(string $field_override = ?): int
public getFacetPrefix(string $field_override = ?): string
public getFacetQueries(): array
public getFacetSort(string $field_override = ?): int
public getFields(): array
public getFilterQueries(): array
public getGroup(): bool
public getGroupCachePercent(): int
public getGroupFacet(): bool
public getGroupFields(): array
public getGroupFormat(): string
public getGroupFunctions(): array
public getGroupLimit(): int
public getGroupMain(): bool
public getGroupNGroups(): bool
public getGroupOffset(): int
public getGroupQueries(): array
public getGroupSortFields(): array
public getGroupTruncate(): bool
public getHighlight(): bool
public getHighlightAlternateField(string $field_override = ?): string
public getHighlightFields(): array
public getHighlightFormatter(string $field_override = ?): string
public getHighlightFragmenter(string $field_override = ?): string
public getHighlightFragsize(string $field_override = ?): int
public getHighlightMaxAlternateFieldLength(string $field_override = ?): int
public getHighlightMergeContiguous(string $field_override = ?): bool
public getHighlightRegexPattern(): string
public getHighlightRegexSlop(): float
public getHighlightSimplePost(string $field_override = ?): string
public getHighlightSimplePre(string $field_override = ?): string
public getHighlightSnippets(string $field_override = ?): int
public getMlt(): bool
public getMltBoost(): bool
public getMltCount(): int
public getMltFields(): array
public getMltMaxNumTokens(): int
public getMltMaxWordLength(): int
public getMltMinDocFrequency(): int
public getMltMinWordLength(): int
public getMltQueryFields(): array
public getQuery(): string
public getRows(): int
public getSortFields(): array
public getStart(): int
public getStats(): bool
public getStatsFacets(): array
public getStatsFields(): array
public getTerms(): bool
public getTermsField(): string
public getTermsLimit(): int
public getTermsLowerBound(): string
public getTermsMaxCount(): int
public getTermsMinCount(): int
public getTermsPrefix(): string
public getTermsReturnRaw(): bool
public getTermsSort(): int
public getTermsUpperBound(): string
public getTimeAllowed(): int
public removeExpandSortField(string $field): SolrQuery
public removeFacetDateField(string $field): SolrQuery
public removeFacetDateOther(string $value, string $field_override = ?): SolrQuery
public removeFacetField(string $field): SolrQuery
public removeFacetQuery(string $value): SolrQuery
public removeField(string $field): SolrQuery
public removeFilterQuery(string $fq): SolrQuery
public removeHighlightField(string $field): SolrQuery
public removeMltField(string $field): SolrQuery
public removeMltQueryField(string $queryField): SolrQuery
public removeSortField(string $field): SolrQuery
public removeStatsFacet(string $value): SolrQuery
public removeStatsField(string $field): SolrQuery
public setEchoHandler(bool $flag): SolrQuery
public setEchoParams(string $type): SolrQuery
public setExpand(bool $value): SolrQuery
public setExpandQuery(string $q): SolrQuery
public setExpandRows(int $value): SolrQuery
public setExplainOther(string $query): SolrQuery
public setFacet(bool $flag): SolrQuery
public setFacetDateEnd(string $value, string $field_override = ?): SolrQuery
public setFacetDateGap(string $value, string $field_override = ?): SolrQuery
public setFacetDateHardEnd(bool $value, string $field_override = ?): SolrQuery
public setFacetDateStart(string $value, string $field_override = ?): SolrQuery
public setFacetEnumCacheMinDefaultFrequency(int $frequency, string $field_override = ?): SolrQuery
public setFacetLimit(int $limit, string $field_override = ?): SolrQuery
public setFacetMethod(string $method, string $field_override = ?): SolrQuery
public setFacetMinCount(int $mincount, string $field_override = ?): SolrQuery
public setFacetMissing(bool $flag, string $field_override = ?): SolrQuery
public setFacetOffset(int $offset, string $field_override = ?): SolrQuery
public setFacetPrefix(string $prefix, string $field_override = ?): SolrQuery
public setFacetSort(int $facetSort, string $field_override = ?): SolrQuery
public setGroup(bool $value): SolrQuery
public setGroupCachePercent(int $percent): SolrQuery
public setGroupFacet(bool $value): SolrQuery
public setGroupFormat(string $value): SolrQuery
public setGroupLimit(int $value): SolrQuery
public setGroupMain(string $value): SolrQuery
public setGroupNGroups(bool $value): SolrQuery
public setGroupOffset(int $value): SolrQuery
public setGroupTruncate(bool $value): SolrQuery
public setHighlight(bool $flag): SolrQuery
public setHighlightAlternateField(string $field, string $field_override = ?): SolrQuery
public setHighlightFormatter(string $formatter, string $field_override = ?): SolrQuery
public setHighlightFragmenter(string $fragmenter, string $field_override = ?): SolrQuery
public setHighlightFragsize(int $size, string $field_override = ?): SolrQuery
public setHighlightMaxAlternateFieldLength(int $fieldLength, string $field_override = ?): SolrQuery
public setHighlightMergeContiguous(bool $flag, string $field_override = ?): SolrQuery
public setHighlightRegexMaxAnalyzedChars(int $maxAnalyzedChars): SolrQuery
public setHighlightRegexPattern(string $value): SolrQuery
public setHighlightRegexSlop(float $factor): SolrQuery
public setHighlightSimplePost(string $simplePost, string $field_override = ?): SolrQuery
public setHighlightSimplePre(string $simplePre, string $field_override = ?): SolrQuery
public setHighlightSnippets(int $value, string $field_override = ?): SolrQuery
public setMlt(bool $flag): SolrQuery
public setMltBoost(bool $flag): SolrQuery
public setMltCount(int $count): SolrQuery
public setMltMaxNumQueryTerms(int $value): SolrQuery
public setMltMaxNumTokens(int $value): SolrQuery
public setMltMaxWordLength(int $maxWordLength): SolrQuery
public setMltMinDocFrequency(int $minDocFrequency): SolrQuery
public setMltMinTermFrequency(int $minTermFrequency): SolrQuery
public setMltMinWordLength(int $minWordLength): SolrQuery
public setOmitHeader(bool $flag): SolrQuery
public setQuery(string $query): SolrQuery
public setRows(int $rows): SolrQuery
public setShowDebugInfo(bool $flag): SolrQuery
public setStart(int $start): SolrQuery
public setStats(bool $flag): SolrQuery
public setTerms(bool $flag): SolrQuery
public setTermsField(string $fieldname): SolrQuery
public setTermsLimit(int $limit): SolrQuery
public setTermsLowerBound(string $lowerBound): SolrQuery
public setTermsMaxCount(int $frequency): SolrQuery
public setTermsMinCount(int $frequency): SolrQuery
public setTermsPrefix(string $prefix): SolrQuery
public setTermsReturnRaw(bool $flag): SolrQuery
public setTermsSort(int $sortType): SolrQuery
public setTermsUpperBound(string $upperBound): SolrQuery
public setTimeAllowed(int $timeAllowed): SolrQuery
public __destruct()
/* Inherited methods */
}

Predefined Constants

SolrQuery::ORDER_ASC

Used to specify that the sorting should be in acending order

SolrQuery::ORDER_DESC

Used to specify that the sorting should be in descending order

SolrQuery::FACET_SORT_INDEX

Used to specify that the facet should sort by index

SolrQuery::FACET_SORT_COUNT

Used to specify that the facet should sort by count

SolrQuery::TERMS_SORT_INDEX

Used in the TermsComponent

SolrQuery::TERMS_SORT_COUNT

Used in the TermsComponent

Table of Contents

Here you can write a comment


Please enter at least 10 characters.
Loading... Please wait.
* Pflichtangabe
There are no comments available yet.

PHP cURL Tutorial: Using cURL to Make HTTP Requests

cURL is a powerful PHP extension that allows you to communicate with different servers using various protocols, including HTTP, HTTPS, FTP, and more. ...

TheMax

Autor : TheMax
Category: PHP-Tutorials

Midjourney Tutorial - Instructions for beginners

There is an informative video about Midjourney, the tool for creating digital images using artificial intelligence, entitled "Midjourney tutorial in German - instructions for beginners" ...

Mike94

Autor : Mike94
Category: KI Tutorials

Basics of views in MySQL

Views in a MySQL database offer the option of creating a virtual table based on the result of an SQL query. This virtual table can be queried like a normal table without changing the underlying data. ...

admin

Autor : admin
Category: mySQL-Tutorials

Publish a tutorial

Share your knowledge with other developers worldwide

Share your knowledge with other developers worldwide

You are a professional in your field and want to share your knowledge, then sign up now and share it with our PHP community

learn more

Publish a tutorial