Sha256: 6b8536d37abd788ccb980315ebe50d3904f53d1158417525cf9ba997f9b839bf

Contents?: true

Size: 1.56 KB

Versions: 1

Compression:

Stored size: 1.56 KB

Contents

BlacklightHighlight: Blacklight plugin that exposes Solr's highlight field component

= Description

The BlacklightHighlight Field plugin provides basic support for the Solr Highlight component, which provides search term highlighting in text fields.

This plugin overrides low-level methods from RSolr::Doc to provide easy access to the highlighting results. This means, however, that if you have a highlighted field, it may be difficult to access the un-highlighted version directly. It also provides a very basic configuration out-of-the-box, with the expectation that you will configure Solr to provide better highlighting results.

= Requirements

A Rails app using Blacklight >=3.2.

= Installation

Add

    gem "blacklight_highlight"

to your Gemfile and run "bundle install".

Then run "rails generate blacklight_highlight" to install the appropriate extensions into your CatalogController and SolrDocument classes. In you want to do customize the way this installs, instead you may:

- add this to your Solr Document model:
    
    include BlacklightHighlight::SolrDocumentExtension

- add this to your Controller:

    include BlacklightHighlight::ControllerExtension


= Configuration

You should configure your Solr request handlers to provide the appropriate highlighting results (see <http://wiki.apache.org/solr/HighlightingParameters>). If you do not add any fields, the Solr default will be used (" the fields highlighted for the LuceneQParser are the defaultSearchField (or the df param if used) and for the DisMax parser the qf fields are used."). 

= Tests

Run `rspec`.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight_highlight-0.1.0 README.rdoc