[Groonga-commit] nroonga/norema [master] Be compliant to ACS return-fields behaviour

Back to archive index

Yoji SHIDARA null+****@clear*****
Wed Aug 22 21:03:12 JST 2012


Yoji SHIDARA	2012-08-22 21:03:12 +0900 (Wed, 22 Aug 2012)

  New Revision: 5ad7fa8392499f12579889080600ed5538139b7e
  https://github.com/nroonga/norema/commit/5ad7fa8392499f12579889080600ed5538139b7e

  Log:
    Be compliant to ACS return-fields behaviour

  Modified files:
    lib/server.js
    tools/convert.js

  Modified: lib/server.js (+3 -2)
===================================================================
--- lib/server.js    2012-08-22 20:57:45 +0900 (8b4609a)
+++ lib/server.js    2012-08-22 21:03:12 +0900 (4ffbe08)
@@ -79,7 +79,8 @@ app.get('/search', function(request, response, next) {
     q: request.query.query,
     start: parseInt((request.query.start || '0'), 10),
     size: 20,
-    facet: 'path'
+    facet: 'path_facet',
+    'return-fields': 'title,desc,path'
   };
 
   if (request.query.in) {
@@ -120,7 +121,7 @@ app.get('/search', function(request, response, next) {
       query: options.q,
       records: results.hits.hit,
       numFound: numFound,
-      pathFacets: results.facets.path.constraints,
+      pathFacets: results.facets.path_facet.constraints,
       from: start + 1,
       to: start + numReturned,
       numShowing: numReturned,

  Modified: tools/convert.js (+1 -0)
===================================================================
--- tools/convert.js    2012-08-22 20:57:45 +0900 (e9f96bf)
+++ tools/convert.js    2012-08-22 21:03:12 +0900 (8f629a2)
@@ -48,6 +48,7 @@ function parse(doc, context) {
     }).filter(function(title) {
       return title;
     });
+    item.path_facet = item.path;
     context.items.push(item);
     context.index++;
   }
-------------- next part --------------
HTML����������������������������...
Download 



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