PHP 7.4.0 alpha 3 Released

SolrDisMaxQuery::addBoostQuery

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

SolrDisMaxQuery::addBoostQueryAdds a boost query field with value and optional boost (bq parameter)

Açıklama

public SolrDisMaxQuery::addBoostQuery ( string $field , string $value [, string $boost ] ) : SolrDisMaxQuery

Adds a Boost Query field with value [and boost] (bq parameter)

Değiştirgeler

field

value

boost

Dönen Değerler

SolrDisMaxQuery

Örnekler

Örnek 1 SolrDisMaxQuery::addBoostQuery() example

<?php

$dismaxQuery 
= new SolrDisMaxQuery("lucene");
$dismaxQuery
    
->addBoostQuery('cat''clothing'2)
    ->
addBoostQuery('cat''electronics'5.1)
;
echo 
$dismaxQuery.PHP_EOL;
?>

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

q=lucene&defType=edismax&bq=cat:clothing^2 cat:electronics^5.1

Ayrıca Bakınız

add a note add a note

User Contributed Notes

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