Class: Droonga::Searcher
- Inherits:
-
Object
- Object
- Droonga::Searcher
- Includes:
- Loggable
- Defined in:
- lib/droonga/searcher.rb,
lib/droonga/searcher/mecab_filter.rb
Defined Under Namespace
Modules: AttributeFormattable, RecordsFormattable Classes: ComplexAttributesFormatter, ComplexRecordsFormatter, CyclicSource, MissingSourceParameter, NoQuery, QuerySearcher, QuerySorter, ResultFormatter, SearchRequest, SearchResult, SimpleAttributesFormatter, SimpleRecordsFormatter, UnknownSource
Instance Method Summary collapse
-
#initialize(context) ⇒ Searcher
constructor
A new instance of Searcher.
- #search(queries) ⇒ Object
Constructor Details
#initialize(context) ⇒ Searcher
Returns a new instance of Searcher.
57 58 59 |
# File 'lib/droonga/searcher.rb', line 57 def initialize(context) @context = context end |
Instance Method Details
#search(queries) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/droonga/searcher.rb', line 61 def search(queries) outputs = nil logger.trace("search: start", :queries => queries) # TODO: THIS IS JUST A WORKAROUND! We should remove it ASAP! disable_gc do @context.push_memory_pool do outputs = process_queries(queries) end end logger.trace("search: done") return outputs end |