« SolrDisMaxQuery::removeBigramPhraseField
SolrDisMaxQuery::removePhraseField »

SolrDisMaxQuery::removeBoostQuery

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

SolrDisMaxQuery::removeBoostQuery — Removes a boost query partial by field name (bq)

説明

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

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

パラメータ

field

Field Name

戻り値

SolrDisMaxQuery

例

例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;

?>

上の例の出力は、 たとえば以下のようになります。

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

参考

関連キーワード:
SolrDisMaxQuery   query   boost   removeBoostQuery   dismaxQuery   Removes   partial   addBoostQuery   lucene   hard   drive   electronics   defType   edismax   removeBigramPhraseField   removePhraseField   information   available   existing   used   example   remove   part   参考   Adds
関連する関数・ページ:
solrdismaxquery.addboostquery   solrdismaxquery.setboostquery   solrdismaxquery.addqueryfield   solrdismaxquery.construct   solrdismaxquery.removephrasefield   solrdismaxquery.removebigramphrasefield