php8.5
Home/ Manual/ solr / solrdismaxquery/ SolrDisMaxQuery::__construct

SolrDisMaxQuery::__construct

PHP function Edit on GitHub ✎

Class Constructor

Description

SolrDisMaxQuery::__construct([string $q])

Class constructor initializes the object and sets the q parameter if passed

Parameters

q

Search Query (q parameter)

Return Values

Errors/Exceptions

Emits SolrIllegalArgumentException in case of an invalid parameter was passed.

Examples

SolrDisMaxQuery::__construct() example

php
<?php

$dismaxQuery = new SolrDisMaxQuery('lucene');
echo $dismaxQuery;

?>

The above example will output:

output
q=lucene&defType=edismax

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