def excerpts(options = {})
      options[:index]                ||= '*'
      options[:before_match]         ||= '<span class="match">'
      options[:after_match]          ||= '</span>'
      options[:chunk_separator]      ||= ' &#8230; ' # ellipsis
      options[:limit]                ||= 256
      options[:limit_passages]       ||= 0
      options[:limit_words]          ||= 0
      options[:around]               ||= 5
      options[:exact_phrase]         ||= false
      options[:single_passage]       ||= false
      options[:query_mode]           ||= false
      options[:force_all_words]      ||= false
      options[:start_passage_id]     ||= 1
      options[:load_files]           ||= false
      options[:html_strip_mode]      ||= 'index'
      options[:allow_empty]          ||= false
      options[:passage_boundary]     ||= 'none'
      options[:emit_zones]           ||= false
      options[:load_files_scattered] ||= false

      response = Response.new request(:excerpt, excerpts_message(options))

      options[:docs].collect { response.next }
    end
def excerpts(options = {})
      options[:index]                ||= '*'
      options[:before_match]         ||= '<span class="match">'
      options[:after_match]          ||= '</span>'
      options[:chunk_separator]      ||= ' &#8230; ' # ellipsis
      options[:limit]                ||= 256
      options[:limit_passages]       ||= 0
      options[:limit_words]          ||= 0
      options[:around]               ||= 5
      options[:exact_phrase]         ||= false
      options[:single_passage]       ||= false
      options[:query_mode]           ||= false
      options[:force_all_words]      ||= false
      options[:start_passage_id]     ||= 1
      options[:load_files]           ||= false
      options[:html_strip_mode]      ||= 'index'
      options[:allow_empty]          ||= false
      options[:passage_boundary]     ||= 'none'
      options[:emit_zones]           ||= false
      options[:load_files_scattered] ||= false

      response = Response.new request(:excerpt, excerpts_message(options))

      options[:docs].collect { response.next }
    end
Build excerpts from search terms (the +words+) and the text of documents. Excerpts are bodies of text that have the +words+ highlighted.
 They may also be abbreviated to fit within a word limit.

 As part of the options hash, you will need to
 define:
 * :docs
 * :words
 * :index

 Optional settings include:
 * :before_match (defaults to <span class="match">)
 * :after_match (defaults to </span>)
 * :chunk_separator (defaults to ' &#8230; ' - which is an HTML ellipsis)
 * :limit (defaults to 256)
 * :around (defaults to 5)
 * :exact_phrase (defaults to false)
 * :single_passage (defaults to false)

 The defaults differ from the official PHP client, as I've opted for
 semantic HTML markup.

 Example:

   client.excerpts(:docs => ["Pat Allan, Pat Cash"], :words => 'Pat', :index => 'pats')
   #=> ["<span class=\"match\">Pat</span> Allan, <span class=\"match\">Pat</span> Cash"]

   lorem_lipsum = "Lorem ipsum dolor..."

   client.excerpts(:docs => ["Pat Allan, #{lorem_lipsum} Pat Cash"], :words => 'Pat', :index => 'pats')
   #=> ["<span class=\"match\">Pat</span> Allan, Lorem ipsum dolor sit amet, consectetur adipisicing
          elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua &#8230; . Excepteur
          sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
          laborum. <span class=\"match\">Pat</span> Cash"]

 Workflow:

 Excerpt creation is completely isolated from searching the index. The nominated index is only used to
 discover encoding and charset information.

 Therefore, the workflow goes:

 1. Do the sphinx query.
 2. Fetch the documents found by sphinx from their repositories.
 3. Pass the documents' text to +excerpts+ for marking up of matched terms.