Class: Ferret::Search::Explanation

Inherits:
Object
  • Object
show all
Defined in:
ext/r_search.c

Overview

Summary

Explanation is used to give a description of why a document matched with the score that it did. Use the Explanation#to_s or Explanation#to_html methods to display the explanation in a human readable format. Creating explanations is an expensive operation so it should only be used for debugging purposes. To create an explanation use the Searcher#explain method.

Example

puts searcher.explain(query, doc_id).to_s