SolrDisMaxQuery
PHP Manual

SolrDisMaxQuery::removeQueryField

(Não há informação de versão disponível, talvez apenas no SVN)

SolrDisMaxQuery::removeQueryFieldRemoves a Query Field (qf parameter)

Descrição

public SolrDisMaxQuery SolrDisMaxQuery::removeQueryField ( string $field )

Removes a Query Field (qf parameter) from the field list added by SolrDisMaxQuery::addQueryField()

qf: When building DisjunctionMaxQueries from the user's query it specifies the fields to search in, and boosts for those fields.

Parâmetros

field

Field Name

Valor Retornado

SolrDisMaxQuery

Exemplos

Exemplo #1 SolrDisMaxQuery::removeQueryField() example

<?php

$dismaxQuery 
= new SolrDisMaxQuery('lucene');
$dismaxQuery
    
->addQueryField('first'3)
    ->
addQueryField('second'0.2)
    ->
addQueryField('cat');
echo 
$dismaxQuery PHP_EOL;
// remove field 'second'
echo $dismaxQuery->removeQueryField('second');
?>

O exemplo acima irá imprimir algo similar à:

q=lucene&defType=edismax&qf=first^3 second^0.2 cat
q=lucene&defType=edismax&qf=first^3 cat

Veja Também


SolrDisMaxQuery
PHP Manual