Class: Ferret::Search::Spans::SpanQuery

Inherits:
Query
  • Object
show all
Defined in:
lib/ferret/search/spans/span_query.rb

Overview

Base class for span-based queries.

Instance Attribute Summary

Attributes inherited from Query

#boost

Instance Method Summary collapse

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

#fieldObject

Returns the name of the field matched by this query.

Raises:

  • (NotImplementedError)


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.

Raises:

  • (NotImplementedError)


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

def spans(reader)
  raise NotImplementedError
end

#termsObject

Returns a collection of all terms matched by this query.

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/ferret/search/spans/span_query.rb', line 16

def terms()
  raise NotImplementedError
end