[Groonga-commit] groonga/gcs [master] Set KEY_NORMALIZE on synonym tables

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 12日 (木) 10:37:41 JST


Yoji SHIDARA	2012-07-12 10:37:41 +0900 (Thu, 12 Jul 2012)

  New Revision: 90ecaef4052346e8eb897edc8c1786050235cf9a
  https://github.com/groonga/gcs/commit/90ecaef4052346e8eb897edc8c1786050235cf9a

  Log:
    Set KEY_NORMALIZE on synonym tables

  Modified files:
    lib/api/2011-02-01/configuration.js
    test/api-configuration.test.js
    test/fixture/companies/synonyms.grn
    test/search.test.js

  Modified: lib/api/2011-02-01/configuration.js (+2 -1)
===================================================================
--- lib/api/2011-02-01/configuration.js    2012-07-11 19:43:15 +0900 (8129ab0)
+++ lib/api/2011-02-01/configuration.js    2012-07-12 10:37:41 +0900 (ffb6667)
@@ -402,7 +402,8 @@ handlers.UpdateSynonymOptions = function(database, request, response) {
     database.commandSync('table_create', {
       name: domain.synonymTableName,
       flags: Database.TABLE_HASH_KEY,
-      key_type: Database.ShortText
+      key_type: Database.ShortText,
+      flags: Database.KEY_NORMALIZE
     });
     database.commandSync('column_create', {
       table: domain.synonymTableName,

  Modified: test/api-configuration.test.js (+1 -1)
===================================================================
--- test/api-configuration.test.js    2012-07-11 19:43:15 +0900 (d397d99)
+++ test/api-configuration.test.js    2012-07-12 10:37:41 +0900 (2fea296)
@@ -570,7 +570,7 @@ suite('Configuration API', function() {
 
         assert.equal(response.body, responseExpected);
         var dumpExpected =
-             'table_create companies_synonyms TABLE_HASH_KEY ShortText\n' +
+             'table_create companies_synonyms TABLE_HASH_KEY|KEY_NORMALIZE ShortText\n' +
              'column_create companies_synonyms synonyms COLUMN_VECTOR ShortText\n' +
              'load --table companies_synonyms\n' +
              '[\n' +

  Modified: test/fixture/companies/synonyms.grn (+1 -1)
===================================================================
--- test/fixture/companies/synonyms.grn    2012-07-11 19:43:15 +0900 (11b78fd)
+++ test/fixture/companies/synonyms.grn    2012-07-12 10:37:41 +0900 (52adbb1)
@@ -1,4 +1,4 @@
-table_create companies_synonyms TABLE_HASH_KEY ShortText
+table_create companies_synonyms TABLE_HASH_KEY|KEY_NORMALIZE ShortText
 column_create companies_synonyms synonyms COLUMN_VECTOR ShortText
 load --table companies_synonyms
 [

  Modified: test/search.test.js (+2 -2)
===================================================================
--- test/search.test.js    2012-07-11 19:43:15 +0900 (fe9aac4)
+++ test/search.test.js    2012-07-12 10:37:41 +0900 (0a13034)
@@ -255,7 +255,7 @@ suite('Search API', function() {
       }
     );
 
-    testSearch('/2011-02-01/search?q=tokio',
+    testSearch('/2011-02-01/search?q=Tokio',
                'should not match with any entry',
                'search-companies-00000000000000000000000000.localhost',
       function(response, body, done) {
@@ -289,7 +289,7 @@ suite('Search API', function() {
       utils.loadDumpFile(database, __dirname + '/fixture/companies/synonyms.grn');
     });
 
-    testSearch('/2011-02-01/search?q=tokio',
+    testSearch('/2011-02-01/search?q=Tokio',
                'should match with using synonyms',
                'search-companies-00000000000000000000000000.localhost',
       function(response, body, done) {
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



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