[Groonga-commit] groonga/gcs [master] search: support match-expr

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Aug 14 18:48:38 JST 2012


Kouhei Sutou	2012-08-14 18:48:38 +0900 (Tue, 14 Aug 2012)

  New Revision: 795271c7b0f1062e6ddfae1cfe7fbc29c2574bfc
  https://github.com/groonga/gcs/commit/795271c7b0f1062e6ddfae1cfe7fbc29c2574bfc

  Log:
    search: support match-expr

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

  Modified: lib/api/2011-02-01/search.js (+1 -1)
===================================================================
--- lib/api/2011-02-01/search.js    2012-08-14 18:46:23 +0900 (4208432)
+++ lib/api/2011-02-01/search.js    2012-08-14 18:48:38 +0900 (9f683f8)
@@ -185,7 +185,7 @@ exports.createHandler = function(context) {
         }
         var result = {
           rank: '-text_relevance', // FIXME
-          'match-expr': '', // FIXME
+          'match-expr': matchExpr,
           hits: {
             found: numFoundRecords,
             start: start,

  Modified: test/api-search.test.js (+7 -7)
===================================================================
--- test/api-search.test.js    2012-08-14 18:46:23 +0900 (5204111)
+++ test/api-search.test.js    2012-08-14 18:48:38 +0900 (323be03)
@@ -58,7 +58,7 @@ suite('Search API', function() {
         var actual = JSON.parse(normalizedBody);
         var expected = { // FIXME
           rank: '-text_relevance',
-          'match-expr': '',
+          'match-expr': "(label 'Hongo')",
           hits: {
             found: 1,
             start: 0,
@@ -95,7 +95,7 @@ suite('Search API', function() {
         var actual = JSON.parse(normalizedBody);
         var expected = {
           rank: '-text_relevance',
-          'match-expr': '',
+          'match-expr': "(label 'Tokyo')",
           hits: {
             found: 3,
             start: 0,
@@ -159,7 +159,7 @@ suite('Search API', function() {
         var actual = JSON.parse(normalizedBody);
         var expected = {
           rank: '-text_relevance',
-          'match-expr': '',
+          'match-expr': "(label 'Tokyo')",
           hits: {
             found: 3,
             start: 0,
@@ -232,7 +232,7 @@ suite('Search API', function() {
         var actual = JSON.parse(normalizedBody);
         var expected = {
           rank: '-text_relevance',
-          'match-expr': '',
+          'match-expr': "(label 'Tokyo')",
           hits: {
             found: 3,
             start: 0,
@@ -284,7 +284,7 @@ suite('Search API', function() {
         var actual = JSON.parse(normalizedBody);
         var expected = {
           rank: '-text_relevance',
-          'match-expr': '',
+          'match-expr': "(label 'Tokyo')",
           hits: {
             found: 3,
             start: 1,
@@ -336,7 +336,7 @@ suite('Search API', function() {
         var actual = JSON.parse(normalizedBody);
         var expected = {
           rank: '-text_relevance',
-          'match-expr': '',
+          'match-expr': "(label 'Tokio')",
           hits: {
             found: 0,
             start: 0,
@@ -370,7 +370,7 @@ suite('Search API', function() {
         var actual = JSON.parse(normalizedBody);
         var expected = {
           rank: '-text_relevance',
-          'match-expr': '',
+          'match-expr': "(label 'Tokio')",
           hits: {
             found: 3,
             start: 0,
-------------- next part --------------
HTML����������������������������...
Download 



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