update : 2015.11.03
php.shukuma.com

검색:
 
 
Add a query field with optional boost (qf parameter)

SolrDisMaxQuery::addQueryField

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

SolrDisMaxQuery::addQueryFieldAdd a query field with optional boost (qf parameter)

설명

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

Add a query field with optional boost (qf parameter)

인수

field

field name

boost

Boost value. Boosts documents with matching terms.

반환값

SolrDisMaxQuery

예제

Example #1 SolrDisMaxQuery::addQueryField() example

<?php

$dismaxQuery 
= new SolrDisMaxQuery("lucene");
$dismaxQuery
    
->addQueryField("location"4)
    ->
addQueryField("price")
    ->
addQueryField("sku")
    ->
addQueryField("title",3.4)
;
echo 
$dismaxQuery;

?>

위 예제의 출력 예시:

q=lucene&defType=edismax&qf=location^4 price sku title^3.4

참고