[Groonga-commit] groonga/gcs [master] Fix broken search for not-faceted queries

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 2日 (木) 15:07:47 JST


Yoji SHIDARA	2012-08-02 15:07:47 +0900 (Thu, 02 Aug 2012)

  New Revision: 31a45e68f321382abb19a3fb2d432d3f53f144e4
  https://github.com/groonga/gcs/commit/31a45e68f321382abb19a3fb2d432d3f53f144e4

  Log:
    Fix broken search for not-faceted queries

  Modified files:
    lib/api/2011-02-01/search.js

  Modified: lib/api/2011-02-01/search.js (+5 -5)
===================================================================
--- lib/api/2011-02-01/search.js    2012-08-02 14:37:12 +0900 (683bc33)
+++ lib/api/2011-02-01/search.js    2012-08-02 15:07:47 +0900 (97bf075)
@@ -90,7 +90,7 @@ exports.createHandler = function(context) {
     var query = request.query.q || '';
     var booleanQuery = request.query.bq || '';
     var filter = null;
-    var facet = request.query.facet;
+    var facetParameter = request.query.facet;
 
     if (booleanQuery) {
       var translator = new BooleanQueryTranslator();
@@ -132,8 +132,8 @@ exports.createHandler = function(context) {
       options.filter = filter;
     }
 
-    if (facet) {
-      options.drilldown = facet;
+    if (facetParameter) {
+      options.drilldown = facetParameter;
       // TODO support sorting
       // TODO support facet-FIELD-top-n parameter
     }
@@ -165,8 +165,8 @@ exports.createHandler = function(context) {
           },
           info: info
         };
-        if (facets) {
-          var facetNames = facet.split(',');
+        if (facetParameter) {
+          var facetNames = facetParameter.split(',');
           var facetsObject = {};
           facets.map(function(facet, index) {
             var facetName = facetNames[index];
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
下載 



Groonga-commit メーリングリストの案内
Back to archive index