Class: Droonga::Searcher

Inherits:
Object
  • Object
show all
Includes:
Loggable
Defined in:
lib/droonga/searcher.rb,
lib/droonga/searcher/mecab_filter.rb

Defined Under Namespace

Modules: AttributeFormattable, RecordsFormattable Classes: ComplexAttributesFormatter, ComplexRecordsFormatter, CyclicSource, InvalidAttribute, MissingSourceParameter, NoQuery, QuerySearcher, QuerySorter, ResultFormatter, SearchRequest, SearchResult, SimpleAttributesFormatter, SimpleRecordsFormatter, SyntaxError, UnknownSource

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Searcher

Returns a new instance of Searcher.



78
79
80
# File 'lib/droonga/searcher.rb', line 78

def initialize(context)
  @context = context
end

Instance Method Details

#search(queries) ⇒ Object



82
83
84
85
86
87
88
89
90
# File 'lib/droonga/searcher.rb', line 82

def search(queries)
  outputs = nil
  logger.trace("search: start", :queries => queries)
  @context.push_memory_pool do
    outputs = process_queries(queries)
  end
  logger.trace("search: done")
  outputs
end