[Groonga-commit] groonga/gcs [master] Fix IndexDocuments action

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 12日 (木) 19:02:13 JST


SHIMODA Hiroshi	2012-07-12 19:02:13 +0900 (Thu, 12 Jul 2012)

  New Revision: 32535104fe6ab0191fbfc354ffab451ff5e32eec
  https://github.com/groonga/gcs/commit/32535104fe6ab0191fbfc354ffab451ff5e32eec

  Log:
    Fix IndexDocuments action

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

  Modified: lib/api/2011-02-01/configuration.js (+5 -3)
===================================================================
--- lib/api/2011-02-01/configuration.js    2012-07-12 19:00:02 +0900 (b0ab374)
+++ lib/api/2011-02-01/configuration.js    2012-07-12 19:02:13 +0900 (06f0525)
@@ -260,9 +260,11 @@ function createIndexDocumentsResponse(options) {
 
 handlers.IndexDocuments = function(context, request, response) {
   var domain = new Domain(request, context);
-  var indexFieldNames = domain.indexFields.map(function(field) {
-                          return field.name;
-                        });
+  var indexFieldNames = domain.indexFields
+                          .map(function(field) {
+                            return field.name;
+                          })
+                          .sort();
   try {
     domain.reindexSync();
     response.contentType('application/xml');

  Modified: test/api-configuration.test.js (+1 -0)
===================================================================
--- test/api-configuration.test.js    2012-07-12 19:00:02 +0900 (073f317)
+++ test/api-configuration.test.js    2012-07-12 19:02:13 +0900 (6cae454)
@@ -529,6 +529,7 @@ suite('Configuration API', function() {
                     '<IndexDocumentsResponse xmlns="' + XMLNS + '">' +
                       '<IndexDocumentsResult>' +
                         '<FieldNames>' +
+                          '<member>age</member>' +
                           '<member>name</member>' +
                         '</FieldNames>' +
                       '</IndexDocumentsResult>' +
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
下載 



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