Class: Droonga::Searcher::QuerySearcher

Inherits:
Object
  • Object
show all
Defined in:
lib/droonga/searcher.rb

Constant Summary collapse

OPERATOR_CONVERSION_TABLE =
{
  "||" => Groonga::Operator::OR,
  "&&" => Groonga::Operator::AND,
  "-"  => Groonga::Operator::AND_NOT,
}

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(search_request) ⇒ QuerySearcher

Returns a new instance of QuerySearcher.



201
202
203
204
# File 'lib/droonga/searcher.rb', line 201

def initialize(search_request)
  @result = SearchResult.new
  @request = search_request
end

Class Method Details

.search(search_request) ⇒ Object



196
197
198
# File 'lib/droonga/searcher.rb', line 196

def search(search_request)
  new(search_request).search
end

Instance Method Details

#searchObject



206
207
208
209
# File 'lib/droonga/searcher.rb', line 206

def search
  search_query!
  @result
end