Class | Ferret::Search::Explanation |
In: |
ext/r_search.c
|
Parent: | Object |
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.
puts searcher.explain(query, doc_id).to_s