[Kazehakase-cvs] CVS update: kazehakase/src/utils

Back to archive index

Ryo SHIMIZU furyo****@users*****
Sat Jun 17 15:56:59 JST 2006


Index: kazehakase/src/utils/estsearch.c
diff -u kazehakase/src/utils/estsearch.c:1.36 kazehakase/src/utils/estsearch.c:1.37
--- kazehakase/src/utils/estsearch.c:1.36	Thu Feb 23 22:29:56 2006
+++ kazehakase/src/utils/estsearch.c	Sat Jun 17 15:56:59 2006
@@ -65,12 +65,13 @@
 	gint err;
 	gchar **split = NULL;
 	gchar *join = NULL;
-	gint max_results = 20, num_summary = 128;
+	gint max_results = 20, num_summary = 128, half_of_summary;
 	gchar *except_word;
 	gchar **except_keywords = NULL;
 
 	KZ_CONF_GET("History", "num_summary", num_summary, INT);
 	KZ_CONF_GET("History", "max_results", max_results, INT);
+	half_of_summary = num_summary / 2;
 
 	split = g_strsplit(search_text, " ", -1);
 	if (split)
@@ -87,9 +88,12 @@
 		except_word = g_strjoinv(" ANDNOT ", except_keywords);
 		g_strfreev(except_keywords);
 
-		command = g_strdup_printf("%s -max %d %s%s %s ANDNOT %s",
+		command = g_strdup_printf("%s -max %d -sn %d %d %d %s%s %s ANDNOT %s",
 					  estsearch_com,
 					  max_results, 
+					  num_summary,
+					  half_of_summary,
+					  half_of_summary,
 					  g_get_home_dir(),
 					  HISTORY_INDEX" ",
 					  join,
@@ -98,9 +102,12 @@
 	}
 	else
 	{
-		command = g_strdup_printf("%s -max %d %s%s %s",
+		command = g_strdup_printf("%s -max %d -sn %d %d %d %s%s %s",
 					  estsearch_com,
 					  max_results, 
+					  num_summary,
+					  half_of_summary,
+					  half_of_summary,
 					  g_get_home_dir(),
 					  HISTORY_INDEX" ",
 					  join);
@@ -128,6 +135,7 @@
 				       NULL);
 	g_strfreev(argv);
 	g_free(command);
+	g_print("%s\n", command);
 
 	return ret;
 }
@@ -241,7 +249,7 @@
 gboolean
 estsearch_update_index (gpointer data)
 {
-	const gchar *estindex_prefix = "estcmd gather -sd -cm -fh ";
+	const gchar *estindex_prefix = "estcmd gather -sd -cm ";
 	gchar *index_dir;
 	gchar *command;
 	gchar *filename;
@@ -500,7 +508,7 @@
 void
 estsearch_make_index(void)
 {
-	const gchar *estgather = "estcmd gather -fh -sd "; 
+	const gchar *estgather = "estcmd gather -sd "; 
 	gchar *command;
 	gint argc;
 	gchar **argv = NULL;


More information about the Kazehakase-cvs mailing list
Back to archive index