Removes a boost query partial by field name (bq)

# 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::addBoostQuery() - Adds a boost query field with value and optional boost (bq parameter)
- SolrDisMaxQuery::setBoostQuery() - Directly Sets Boost Query Parameter (bq)

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open