Class: Ferret::Search::BooleanClause::Occur

Inherits:
Utils::Parameter show all
Defined in:
lib/ferret/search/boolean_clause.rb

Constant Summary collapse

MUST =

Use this operator for terms that must appear in the matching documents.

Occur.new("MUST")
SHOULD =

Use this operator for terms that should appear in the matching documents. For a BooleanQuery with two SHOULD subqueries, at least one of the queries must appear in the matching documents.

Occur.new("SHOULD")
MUST_NOT =

Use this operator for terms that _must not_ appear in the matching documents. Note that it is not possible to search for queries that only consist of a MUST_NOT query.

Occur.new("MUST_NOT")

Instance Method Summary collapse

Methods inherited from Utils::Parameter

#_dump, _load, #hash

Instance Method Details

#to_sObject



9
10
11
12
13
# File 'lib/ferret/search/boolean_clause.rb', line 9

def to_s() 
  return "+" if (self == MUST)
  return "-" if (self == MUST_NOT)
  return ""
end