SolrDisMaxQuery::removePhraseField

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

SolrDisMaxQuery::removePhraseFieldУдаляет поле фразы (параметра)

Описание

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

Удаляет поле фразы (параметра), которое было ранее добавлено с помощью SolrDisMaxQuery::addPhraseField

Список параметров

field

Имя поля

Возвращаемые значения

SolrDisMaxQuery

Примеры

Пример #1 Пример использования SolrDisMaxQuery::removePhraseField()

<?php
$dismaxQuery 
= new SolrDisMaxQuery('lucene');
$dismaxQuery
    
->addPhraseField('first'31)
    ->
addPhraseField('second'41)
    ->
addPhraseField('cat'55);
echo 
$dismaxQuery PHP_EOL;
echo 
$dismaxQuery->removePhraseField('second');
?>

Результатом выполнения данного примера будет что-то подобное:

q=lucene&defType=edismax&pf=first~1^3 second~1^4 cat^55
q=lucene&defType=edismax&pf=first~1^3 cat^55

Смотрите также

add a note add a note

User Contributed Notes

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