php8.5
Home/ Manual/ solr / solrquery/ SolrQuery::setHighlightQuery

SolrQuery::setHighlightQuery

PHP function Edit on GitHub ✎

(PECL solr >= 2.7.0)

A query designated for highlighting

Description

SolrQuery::setHighlightQuery(string $q): SolrQuery

A query to use for highlighting and which will be set as the value of the Solr hl.q parameter. This parameter allows one to highlight different terms or fields than those being used to retrieve documents.

Default value when not set: the value of the request's q parameter.

See the Highlighting section for more details about the Solr hl.q parameter.

Parameters

q

Highlight Query.

Return Values

Returns the current SolrQuery object.

See Also

  • SolrQuery::getHighlightQuery
  • SolrQuery::setHighlightFields
  • SolrQuery::getHighlightFields

Source: reference/solr/solrquery/sethighlightquery.xml · from the official PHP manual (php/doc-en)