PHP 8.4.1 Released!

SolrDisMaxQuery::removeBoostQuery

(No version information available, might only be in Git)

SolrDisMaxQuery::removeBoostQueryRemoves a boost query partial by field name (bq)

Açıklama

public SolrDisMaxQuery::removeBoostQuery(string $field): SolrDisMaxQuery

Removes a boost query partial from the existing query, only if SolrDisMaxQuery::addBoostQuery() was used.

Bağımsız Değişkenler

field

Field Name

Dönen Değerler

SolrDisMaxQuery

Örnekler

Örnek 1 SolrDisMaxQuery::removeBoostQuery() example

<?php

$dismaxQuery
= new SolrDisMaxQuery("lucene");
$dismaxQuery
->addBoostQuery('cat', 'electronics', 5.1)
->
addBoostQuery('cat', 'hard drive')
;
echo
$dismaxQuery.PHP_EOL;
// now remove a query part with field 'cat'
$dismaxQuery
->removeBoostQuery('cat');
echo
$dismaxQuery . PHP_EOL;

?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

q=lucene&defType=edismax&bq=cat:electronics^5.1 cat:hard drive
q=lucene&defType=edismax&bq=cat:hard drive

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top