function apachesolr_views_handler_field_snippet::query in Apache Solr Views 6
File
- handlers/
apachesolr_views_handler_field_snippet.inc, line 54 - provides a field handler for the snippet coming from the ApacheSolr search engine
Class
- apachesolr_views_handler_field_snippet
- @file provides a field handler for the snippet coming from the ApacheSolr search engine
Code
function query() {
// Wierd that with ht.alternateField we can't have the snippet be the body...
$this->query
->add_solr_field('body');
$this->query
->set_param('hl.snippets', $this->options['num_snippets']);
$this->query
->set_param('hl.fragsize', $this->options['fragsize']);
$this->query
->set_param('hl.mergeContiguous', $this->options['merge']);
$this->query
->set_param('hl.simple.pre', '<' . $this->options['tag'] . '>');
$this->query
->set_param('hl.simple.post', '</' . $this->options['tag'] . '>');
}