SolrQuery::addHighlightField

(PECL solr >= 0.9.2)

SolrQuery::addHighlightFieldMaps to hl.fl

Description

public SolrQuery SolrQuery::addHighlightField ( string $field )

Maps to hl.fl. This is used to specify that highlighted snippets should be generated for a particular field

Parameters

field

Name of the field

Return Values

Returns the current SolrQuery object, if the return value is used.

Коментарии

Hello all,

I have being working on filter using solr server. I got a problem in using addFilterQuery(). Below is my code snippet:-

        $query = new SolrQuery();

        $query->setQuery('*:*');

        $query->setStart(0);

        $query->setRows(50);

        $query->addFilterQuery('oxprice:[10 TO 100]');

        $query_response = $client->query($query);

        $response = $query_response->getResponse();

        print_r($response);exit;

Problem is I get data without filtering price range of 10 TO 100 ( I mean I get records without any filtering). Please help me find Solution..

Thanks In Advance.
2013-12-11 13:14:55
http://php5.kiev.ua/manual/ru/solrquery.addhighlightfield.html

    Поддержать сайт на родительском проекте КГБ