[Groonga-commit] droonga/fluent-plugin-droonga at 0d33b0d [master] Move need_output? to SearchRequest

Back to archive index

Yoji Shidara null+****@clear*****
Thu Dec 19 16:52:23 JST 2013


Yoji Shidara	2013-12-19 16:52:23 +0900 (Thu, 19 Dec 2013)

  New Revision: 0d33b0d252ba601cab9223eece2a11a9de1ddd76
  https://github.com/droonga/fluent-plugin-droonga/commit/0d33b0d252ba601cab9223eece2a11a9de1ddd76

  Message:
    Move need_output? to SearchRequest
    
    @result.records should always be truthy after QuerySearcher#search is called

  Modified files:
    lib/droonga/searcher.rb

  Modified: lib/droonga/searcher.rb (+5 -5)
===================================================================
--- lib/droonga/searcher.rb    2013-12-19 16:21:25 +0900 (235abff)
+++ lib/droonga/searcher.rb    2013-12-19 16:52:23 +0900 (779a9ad)
@@ -72,7 +72,7 @@ module Droonga
           results[name] = search_result.records
           $log.trace("#{log_tag}: process_queries: search: done",
                      :name => name)
-          if searcher.need_output?
+          if search_request.need_output?
             $log.trace("#{log_tag}: process_queries: format: start",
                        :name => name)
             outputs[name] = ResultFormatter.format(search_request, search_result)
@@ -134,6 +134,10 @@ module Droonga
         @query = query
         @resolved_results = resolved_results
       end
+
+      def need_output?
+        @query.has_key?("output")
+      end
     end
 
     class QuerySearcher
@@ -147,10 +151,6 @@ module Droonga
         @result
       end
 
-      def need_output?
-        @result.records and****@reque*****_key?("output")
-      end
-
       private
       def parse_condition(source, expression, condition)
         if condition.is_a? String
-------------- next part --------------
HTML����������������������������...
Download 



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