[Groonga-commit] groonga/groonga at b48743e [master] grn_ts: fix a bug that --scorer does not work

アーカイブの一覧に戻る

Susumu Yata null+****@clear*****
Mon Nov 30 21:32:50 JST 2015


Susumu Yata	2015-11-30 21:32:50 +0900 (Mon, 30 Nov 2015)

  New Revision: b48743e405f80bcea417f36a95e750aa7f24bd2b
  https://github.com/groonga/groonga/commit/b48743e405f80bcea417f36a95e750aa7f24bd2b

  Message:
    grn_ts: fix a bug that --scorer does not work

  Modified files:
    lib/ts.c

  Modified: lib/ts.c (+9 -1)
===================================================================
--- lib/ts.c    2015-11-30 13:40:26 +0900 (4dde714)
+++ lib/ts.c    2015-11-30 21:32:50 +0900 (d1e5f09)
@@ -761,7 +761,15 @@ grn_ts_select_with_sortby(grn_ctx *ctx, grn_obj *table,
       if (rc != GRN_SUCCESS) {
         break;
       } else if (!batch_size) {
-        /* Complete sorting. */
+        /* Apply a scorer and complete sorting. */
+        if (scorer_expr) {
+          rc = grn_ts_expr_adjust(ctx, scorer_expr,
+                                  recs + n_recs - n_pending_recs,
+                                  n_pending_recs);
+          if (rc != GRN_SUCCESS) {
+            break;
+          }
+        }
         if (n_pending_recs) {
           rc = grn_ts_sorter_progress(ctx, sorter, recs, n_recs, &n_recs);
           if (rc != GRN_SUCCESS) {
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る