protected function set_query($query, $q) {
        // Set hightlighting.
        $query->setHighlight(true);
        foreach ($this->highlightfields as $field) {
            $query->addHighlightField($field);
        }
        $query->setHighlightFragsize(static::FRAG_SIZE);
        $query->setHighlightSimplePre(self::HIGHLIGHT_START);
        $query->setHighlightSimplePost(self::HIGHLIGHT_END);
        $query->setHighlightMergeContiguous(true);

        $query->setQuery($q);

        // A reasonable max.
        $query->setRows(static::QUERY_SIZE);
    }
protected function set_query($query, $q) {
        // Set hightlighting.
        $query->setHighlight(true);
        foreach ($this->highlightfields as $field) {
            $query->addHighlightField($field);
        }
        $query->setHighlightFragsize(static::FRAG_SIZE);
        $query->setHighlightSimplePre(self::HIGHLIGHT_START);
        $query->setHighlightSimplePost(self::HIGHLIGHT_END);
        $query->setHighlightMergeContiguous(true);

        $query->setQuery($q);

        // A reasonable max.
        $query->setRows(static::QUERY_SIZE);
    }
protected function set_query ( $ query , $ q ) { // Set hightlighting. $ query -> setHighlight ( true ) ; foreach ( $ this -> highlightfields as $ field ) { $ query -> addHighlightField ( $ field ) ; } $ query -> setHighlightFragsize ( static :: FRAG_SIZE ) ; $ query -> setHighlightSimplePre ( self :: HIGHLIGHT_START ) ; $ query -> setHighlightSimplePost ( self :: HIGHLIGHT_END ) ; $ query -> setHighlightMergeContiguous ( true ) ; $ query -> setQuery ( $ q ) ; // A reasonable max. $ query -> setRows ( static :: QUERY_SIZE ) ; }
Prepares a new query by setting the query, start offset and rows to return.

@param SolrQuery $query
@param object    $q Containing query and filters.
Prepares a new query by setting the query start offset and rows to return .