Class: Ferret::Search::MatchAllDocsQuery
- Defined in:
- lib/ferret/search/match_all_docs_query.rb
Overview
A query that matches all documents.
Defined Under Namespace
Classes: MatchAllDocsWeight, MatchAllScorer
Instance Attribute Summary
Attributes inherited from Query
Instance Method Summary collapse
- #create_weight(searcher) ⇒ Object
- #eql?(o) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize ⇒ MatchAllDocsQuery
constructor
A new instance of MatchAllDocsQuery.
- #to_s(field) ⇒ Object
Methods inherited from Query
#combine, #extract_terms, #merge_boolean_queries, #rewrite, #similarity, #weight
Constructor Details
#initialize ⇒ MatchAllDocsQuery
Returns a new instance of MatchAllDocsQuery.
5 6 7 |
# File 'lib/ferret/search/match_all_docs_query.rb', line 5 def initialize() super end |
Instance Method Details
#create_weight(searcher) ⇒ Object
85 86 87 |
# File 'lib/ferret/search/match_all_docs_query.rb', line 85 def create_weight(searcher) return MatchAllDocsWeight.new(self, searcher) end |
#eql?(o) ⇒ Boolean Also known as: ==
95 96 97 |
# File 'lib/ferret/search/match_all_docs_query.rb', line 95 def eql?(o) return (o.instance_of?(MatchAllDocsQuery) and boost == o.boost) end |
#hash ⇒ Object
100 101 102 |
# File 'lib/ferret/search/match_all_docs_query.rb', line 100 def hash return boost.hash end |
#to_s(field) ⇒ Object
89 90 91 92 93 |
# File 'lib/ferret/search/match_all_docs_query.rb', line 89 def to_s(field) buffer = "MatchAllDocsQuery" buffer << "^#{boost}" if (boost() != 1.0) return buffer end |