[Groonga-commit] groonga/fluent-plugin-droonga [master] Set result out of searcher

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 9 18:17:00 JST 2013


Kouhei Sutou	2013-04-09 18:17:00 +0900 (Tue, 09 Apr 2013)

  New Revision: 9fc0439dab8b346fb7b7e23699a6afec40209113
  https://github.com/groonga/fluent-plugin-droonga/commit/9fc0439dab8b346fb7b7e23699a6afec40209113

  Message:
    Set result out of searcher

  Modified files:
    lib/droonga/plugin/handler_search.rb

  Modified: lib/droonga/plugin/handler_search.rb (+5 -4)
===================================================================
--- lib/droonga/plugin/handler_search.rb    2013-04-09 18:15:08 +0900 (31d3dca)
+++ lib/droonga/plugin/handler_search.rb    2013-04-09 18:17:00 +0900 (8c1a938)
@@ -49,7 +49,7 @@ module Droonga
       query_sorter.tsort.each do |name|
         if queries[name]
           searcher = QuerySearcher.new(@context, name, queries[name])
-          searcher.search(results)
+          results[name] = searcher.search(results)
           searcher.output(outputs)
         elsif @context[name]
           results[name] = @context[name]
@@ -90,7 +90,7 @@ module Droonga
       end
 
       def search(results)
-        search_query(@name, @query, results)
+        search_query(@query, results)
       end
 
       def parseCondition(source, expression, condition)
@@ -168,7 +168,7 @@ module Droonga
         end
       end
 
-      def search_query(name, query, results)
+      def search_query(query, results)
         start_time = Time.now
         result = source = results[query["source"]]
         if query["condition"]
@@ -194,7 +194,8 @@ module Droonga
           end
           result = result.sort(keys, :offset => offset, :limit => limit)
         end
-        @result = results[name] = result
+        @result = result
+        result
       end
 
       def output(outputs)
-------------- next part --------------
HTML����������������������������...
Download 



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