[Groonga-commit] droonga/fluent-plugin-droonga at 3186d8d [master] Introduce SearchRequest

Back to archive index

Yoji Shidara null+****@clear*****
Thu Dec 19 14:05:56 JST 2013


Yoji Shidara	2013-12-19 14:05:56 +0900 (Thu, 19 Dec 2013)

  New Revision: 3186d8d4f43f96e65d967dee0573c0c91cef2809
  https://github.com/droonga/fluent-plugin-droonga/commit/3186d8d4f43f96e65d967dee0573c0c91cef2809

  Merged ce62e72: Merge branch 'refactor-searcher'

  Message:
    Introduce SearchRequest

  Modified files:
    lib/droonga/searcher.rb

  Modified: lib/droonga/searcher.rb (+13 -2)
===================================================================
--- lib/droonga/searcher.rb    2013-12-19 13:06:37 +0900 (b483b60)
+++ lib/droonga/searcher.rb    2013-12-19 14:05:56 +0900 (30a833f)
@@ -66,7 +66,8 @@ module Droonga
         if queries[name]
           $log.trace("#{log_tag}: process_queries: search: start",
                      :name => name)
-          searcher = QuerySearcher.new(@context, queries[name])
+          search_request = SearchRequest.new(@context, queries[name])
+          searcher = QuerySearcher.new(search_request)
           results[name] = searcher.search(results)
           $log.trace("#{log_tag}: process_queries: search: done",
                      :name => name)
@@ -278,10 +279,20 @@ module Droonga
       end
     end
 
-    class QuerySearcher
+    class SearchRequest
+      attr_reader :context, :query
+
       def initialize(context, query)
         @context = context
         @query = query
+      end
+    end
+
+    class QuerySearcher
+      def initialize(search_request)
+        @request = search_request
+        @context =****@reque*****
+        @query =****@reque*****
         @result = nil
         @condition = nil
         @start_time = nil
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index