Class: Ferret::Search::TopFieldDocs

Inherits:
TopDocs
  • Object
show all
Defined in:
lib/ferret/search/top_field_docs.rb

Overview

Expert: Returned by low-level sorted search implementations.

Instance Attribute Summary collapse

Attributes inherited from TopDocs

#score_docs, #total_hits

Instance Method Summary collapse

Methods inherited from TopDocs

#each, #to_s

Constructor Details

#initialize(total_hits, score_docs, fields) ⇒ TopFieldDocs

Creates one of these objects.

total_hits

Total number of hits for the query.

score_docs

The top hits for the query.

fields

The sort criteria used to find the top hits.



12
13
14
15
# File 'lib/ferret/search/top_field_docs.rb', line 12

def initialize(total_hits, score_docs, fields) 
  super(total_hits, score_docs)
  @fields = fields
end

Instance Attribute Details

#fieldsObject

The fields which were used to sort results by.



6
7
8
# File 'lib/ferret/search/top_field_docs.rb', line 6

def fields
  @fields
end