Class: Ferret::Search::Spans::SpanQuery
- Defined in:
- lib/ferret/search/spans/span_query.rb
Overview
Base class for span-based queries.
Direct Known Subclasses
SpanFirstQuery, SpanNearQuery, SpanNotQuery, SpanOrQuery, SpanTermQuery
Instance Attribute Summary
Attributes inherited from Query
Instance Method Summary collapse
- #create_weight(searcher) ⇒ Object
-
#field ⇒ Object
Returns the name of the field matched by this query.
-
#spans(reader) ⇒ Object
Expert: Returns the matches for this query in an index.
-
#terms ⇒ Object
Returns a collection of all terms matched by this query.
Methods inherited from Query
#combine, #extract_terms, #initialize, #merge_boolean_queries, #rewrite, #similarity, #to_s, #weight
Constructor Details
This class inherits a constructor from Ferret::Search::Query
Instance Method Details
#create_weight(searcher) ⇒ Object
20 21 22 |
# File 'lib/ferret/search/spans/span_query.rb', line 20 def create_weight(searcher) return SpanWeight.new(self, searcher) end |
#field ⇒ Object
Returns the name of the field matched by this query.
11 12 13 |
# File 'lib/ferret/search/spans/span_query.rb', line 11 def field() raise NotImplementedError end |
#spans(reader) ⇒ Object
Expert: Returns the matches for this query in an index. Used internally to search for spans.
6 7 8 |
# File 'lib/ferret/search/spans/span_query.rb', line 6 def spans(reader) raise NotImplementedError end |
#terms ⇒ Object
Returns a collection of all terms matched by this query.
16 17 18 |
# File 'lib/ferret/search/spans/span_query.rb', line 16 def terms() raise NotImplementedError end |