[Groonga-commit] groonga/gcs [master] Add a test for bq expression about literal field

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Aug 23 14:32:30 JST 2012


YUKI Hiroshi	2012-08-23 14:32:30 +0900 (Thu, 23 Aug 2012)

  New Revision: 354073ba968e77b4feaab322246f6aa90f2d25a0
  https://github.com/groonga/gcs/commit/354073ba968e77b4feaab322246f6aa90f2d25a0

  Log:
    Add a test for bq expression about literal field

  Modified files:
    test/bq-translator.test.js

  Modified: test/bq-translator.test.js (+6 -5)
===================================================================
--- test/bq-translator.test.js    2012-08-23 14:22:21 +0900 (bfb54a8)
+++ test/bq-translator.test.js    2012-08-23 14:32:30 +0900 (64b5199)
@@ -157,6 +157,8 @@ suite('BoolanQueryTranslator', function() {
     temporaryDatabase = utils.createTemporaryDatabase();
     context = temporaryDatabase.get();
     domain = new Domain('test', context).createSync();
+    domain.getIndexField('literalfield').setType('literal')
+      .setFacetEnabled(true).setSearchEnabled(true).createSync();
   });
 
   teardown(function() {
@@ -169,16 +171,15 @@ suite('BoolanQueryTranslator', function() {
   testQuery("expression",
             "type:'ModelName'",
             'type @ "ModelName"');
+  testQuery("expression for literal column",
+            "literalfield:'ModelName'",
+            'literalfield == "ModelName"');
   testQuery("multiple words expression",
             "type:'Model Name'",
             'type @ "Model" && type @ "Name"');
   testQuery("multiple words expression for literal column",
             "literalfield:'Model Name'",
-            'literalfield == "Model Name"',
-            function() {
-              domain.getIndexField('literalfield').setType('literal')
-               .setFacetEnabled(true).setSearchEnabled(true).createSync();
-            });
+            'literalfield == "Model Name"');
   testQuery("group: raw expressions",
             "(and field1:'keyword1' field2:'keyword2' type:'ModelName')",
             '(field1 @ "keyword1" && field2 @ "keyword2" && type @ "ModelName")');
-------------- next part --------------
HTML����������������������������...
下載 



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