[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] [wrapper] add fulltext search handler but not used yet.

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:25:19 JST 2012


Kouhei Sutou	2011-06-18 09:44:35 +0900 (Sat, 18 Jun 2011)

  New Revision: 574abde7152688ed4a2ace7ceea4614dfc67a761
  https://github.com/mroonga/mroonga/commit/574abde7152688ed4a2ace7ceea4614dfc67a761

  Log:
    [wrapper] add fulltext search handler but not used yet.

  Modified files:
    ha_mroonga.cc

  Modified: ha_mroonga.cc (+40 -0)
===================================================================
--- ha_mroonga.cc    2011-06-18 09:30:07 +0900 (adf1f8b)
+++ ha_mroonga.cc    2011-06-18 09:44:35 +0900 (d81faf2)
@@ -825,6 +825,46 @@ mysql_declare_plugin(mroonga)
 mysql_declare_plugin_end;
 
 
+static int mrn_wrapper_ft_read_next(FT_INFO *handler, char *record)
+{
+  return HA_ERR_END_OF_FILE;
+}
+
+static float mrn_wrapper_ft_find_relevance(FT_INFO *handler, uchar *record,
+                                           uint length)
+{
+  st_mrn_ft_info *info = (st_mrn_ft_info *)handler;
+  return (float) -1.0;
+}
+
+static void mrn_wrapper_ft_close_search(FT_INFO *handler)
+{
+  st_mrn_ft_info *info = (st_mrn_ft_info *)handler;
+  grn_obj_unlink(info->ctx, info->result);
+  info->ctx = NULL;
+  info->result = NULL;
+  info->rid = GRN_ID_NIL;
+  delete info;
+}
+
+static float mrn_wrapper_ft_get_relevance(FT_INFO *handler)
+{
+  return (float) -1.0;
+}
+
+static void mrn_wrapper_ft_reinit_search(FT_INFO *handler)
+{
+}
+
+static _ft_vft mrn_wrapper_ft_vft = {
+  mrn_wrapper_ft_read_next,
+  mrn_wrapper_ft_find_relevance,
+  mrn_wrapper_ft_close_search,
+  mrn_wrapper_ft_get_relevance,
+  mrn_wrapper_ft_reinit_search
+};
+
+
 static float mrn_default_ft_find_relevance(FT_INFO *handler, uchar *record,
                                            uint length)
 {
-------------- next part --------------
HTML����������������������������...
Download 



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