[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] [wrapper][write] fix wrong ID resolution.

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 11:08:47 JST 2012


Kouhei Sutou	2011-06-18 21:02:54 +0900 (Sat, 18 Jun 2011)

  New Revision: 2f456c9ef7105a32110c1ad624799a8b8c849f22
  https://github.com/mroonga/mroonga/commit/2f456c9ef7105a32110c1ad624799a8b8c849f22

  Log:
    [wrapper][write] fix wrong ID resolution.

  Modified files:
    ha_mroonga.cc

  Modified: ha_mroonga.cc (+9 -3)
===================================================================
--- ha_mroonga.cc    2011-06-18 20:54:25 +0900 (fc961f4)
+++ ha_mroonga.cc    2011-06-18 21:02:54 +0900 (dd4f5dd)
@@ -847,9 +847,15 @@ static float mrn_wrapper_ft_find_relevance(FT_INFO *handler, uchar *record,
                             GRN_TEXT_LEN(&(info->key)));
 
   if (record_id != GRN_ID_NIL) {
-    GRN_BULK_REWIND(&(info->score));
-    grn_obj_get_value(info->ctx, info->score_column, record_id, &(info->score));
-    score = (float)GRN_INT32_VALUE(&(info->score));
+    grn_id result_record_id;
+    result_record_id = grn_table_get(info->ctx, info->result,
+                                     &record_id, sizeof(grn_id));
+    if (result_record_id != GRN_ID_NIL) {
+      GRN_BULK_REWIND(&(info->score));
+      grn_obj_get_value(info->ctx, info->score_column,
+                        result_record_id, &(info->score));
+      score = (float)GRN_INT32_VALUE(&(info->score));
+    }
   }
 
   DBUG_RETURN(score);
-------------- next part --------------
HTML����������������������������...
Download 



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