[Groonga-commit] groonga/gcs [master] Fix missing "IndexField." prefix for DefineIndexField options

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Oct 17 17:41:45 JST 2012


YUKI Hiroshi	2012-10-17 17:41:45 +0900 (Wed, 17 Oct 2012)

  New Revision: 205ddc264edeb8bc5f86bfb69e2112042af7a299
  https://github.com/groonga/gcs/commit/205ddc264edeb8bc5f86bfb69e2112042af7a299

  Log:
    Fix missing "IndexField." prefix for DefineIndexField options

  Modified files:
    bin/gcs-import-examples-http
    lib/api/2011-02-01/configuration.js
    test/api-configuration.test.js

  Modified: bin/gcs-import-examples-http (+4 -4)
===================================================================
--- bin/gcs-import-examples-http    2012-10-17 16:46:51 +0900 (107d314)
+++ bin/gcs-import-examples-http    2012-10-17 17:41:45 +0900 (3924d55)
@@ -100,16 +100,16 @@ search_endpoint=`echo "$create_domain_result" | $sed -e "s/.+<SearchService><End
 
 echo "==== Adding index fields"
 echo "== Creating 'name' field"
-curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=name&IndexField.IndexFieldType=text&TextOptions.ResultEnabled=true&TextOption.FacetEnabled=true&Version=2011-02-01"
+curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=name&IndexField.IndexFieldType=text&IndexField.TextOptions.ResultEnabled=true&IndexField.TextOption.FacetEnabled=true&Version=2011-02-01"
 echo
 echo "== Creating 'address' field"
-curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=address&IndexField.IndexFieldType=text&TextOptions.ResultEnabled=true&TextOption.FacetEnabled=true&Version=2011-02-01"
+curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=address&IndexField.IndexFieldType=text&IndexField.TextOptions.ResultEnabled=true&IndexField.TextOption.FacetEnabled=true&Version=2011-02-01"
 echo
 echo "== Creating 'email_address' field"
-curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=email_address&IndexField.IndexFieldType=text&TextOptions.ResultEnabled=true&TextOption.FacetEnabled=true&Version=2011-02-01"
+curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=email_address&IndexField.IndexFieldType=text&IndexField.TextOptions.ResultEnabled=true&IndexField.TextOption.FacetEnabled=true&Version=2011-02-01"
 echo
 echo "== Creating 'products' field"
-curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=products&IndexField.IndexFieldType=literal&LiteralOptions.SearchEnabled=true&LiteralOptions.ResultEnabled=true&LiteralOptions.FacetEnabled=true&Version=2011-02-01"
+curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=products&IndexField.IndexFieldType=literal&IndexField.LiteralOptions.SearchEnabled=true&IndexField.LiteralOptions.ResultEnabled=true&IndexField.LiteralOptions.FacetEnabled=true&Version=2011-02-01"
 echo
 
 echo

  Modified: lib/api/2011-02-01/configuration.js (+3 -3)
===================================================================
--- lib/api/2011-02-01/configuration.js    2012-10-17 16:46:51 +0900 (2df62b0)
+++ lib/api/2011-02-01/configuration.js    2012-10-17 17:41:45 +0900 (ea027fd)
@@ -223,11 +223,11 @@ function createIndexFieldStatus(options) {
 
 function getFieldOption(option, request, type) {
   if (type == 'text')
-    return request.query['TextOptions.' + option];
+    return request.query['IndexField.TextOptions.' + option];
   if (type == 'literal')
-    return request.query['LiteralOptions.' + option];
+    return request.query['IndexField.LiteralOptions.' + option];
   else
-    return request.query['UIntOptions.' + option];
+    return request.query['IndexField.UIntOptions.' + option];
 }
 
 handlers.DefineIndexField = function(context, request, response, config) {

  Modified: test/api-configuration.test.js (+5 -4)
===================================================================
--- test/api-configuration.test.js    2012-10-17 16:46:51 +0900 (6c3cf33)
+++ test/api-configuration.test.js    2012-10-17 17:41:45 +0900 (afb9435)
@@ -356,7 +356,8 @@ suite('Configuration API', function() {
         .get('/?DomainName=companies&Action=CreateDomain&Version=2011-02-01')
         .get('/?DomainName=companies&IndexField.IndexFieldName=name&' +
              'IndexField.IndexFieldType=text&' +
-             'TextOptions.FacetEnabled=true&TextOptions.ResultEnabled=true&' +
+             'IndexField.TextOptions.FacetEnabled=true&' +
+             'IndexField.TextOptions.ResultEnabled=true&' +
              'Action=DefineIndexField&Version=2011-02-01')
         .next(function(response) {
           var domain = new Domain('companies', context);
@@ -458,9 +459,9 @@ suite('Configuration API', function() {
         .get('/?DomainName=companies&Action=CreateDomain&Version=2011-02-01')
         .get('/?DomainName=companies&IndexField.IndexFieldName=product&' +
              'IndexField.IndexFieldType=literal&' +
-             'LiteralOptions.SearchEnabled=true&' +
-             'LiteralOptions.FacetEnabled=true&' +
-             'LiteralOptions.ResultEnabled=true&' +
+             'IndexField.LiteralOptions.SearchEnabled=true&' +
+             'IndexField.LiteralOptions.FacetEnabled=true&' +
+             'IndexField.LiteralOptions.ResultEnabled=true&' +
              'Action=DefineIndexField&Version=2011-02-01')
         .next(function(response) {
           var domain = new Domain('companies', context);
-------------- next part --------------
HTML����������������������������...
다운로드 



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