svnno****@sourc*****
svnno****@sourc*****
Sun Feb 24 17:20:14 JST 2008
Revision: 3394 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3394 Author: pal_gene Date: 2008-02-24 17:20:14 +0900 (Sun, 24 Feb 2008) Log Message: ----------- *Impove around Hyperestraier modified: module/search/kz-hyper-estraier-search.c Modified Paths: -------------- kazehakase/trunk/module/search/kz-hyper-estraier-search.c Modified: kazehakase/trunk/module/search/kz-hyper-estraier-search.c =================================================================== --- kazehakase/trunk/module/search/kz-hyper-estraier-search.c 2008-02-24 08:20:10 UTC (rev 3393) +++ kazehakase/trunk/module/search/kz-hyper-estraier-search.c 2008-02-24 08:20:14 UTC (rev 3394) @@ -321,8 +321,7 @@ g_string_append(html, HEAD); g_string_append(html, "<body>\n"); - g_string_append_printf(html, "<h1>Search results for %s</h1>", - text); + g_string_append_printf(html, "<h1>Search results for %s</h1>\n", text); for (i = 0; i < MIN(n_results, max_results); i++) { @@ -440,7 +439,6 @@ register_document (KzSearch *search, const gchar *uri, const gchar *title, const gchar *contents, GTime mtime) { ESTDOC *doc; - int ecode; gboolean success; gchar *time_str, *filename, *text = NULL; gchar *tmp_filename, *tmp_path; @@ -479,8 +477,15 @@ } success = est_mtdb_put_doc(he_search->db, doc, ESTPDCLEAN) != 0; - if (!success) - g_warning("register error: %s", est_err_msg(ecode)); + if (!success) { + g_warning("register error: %s", est_err_msg(est_mtdb_error(he_search->db))); + g_warning("retry..."); + est_mtdb_sync(he_search->db); + if(est_mtdb_put_doc(he_search->db, doc, ESTPDCLEAN) != 0) { + g_warning("register error: %s", est_err_msg(est_mtdb_error(he_search->db))); + g_warning("drop %s,%s\n", ESTDATTRURI, est_doc_attr(doc, ESTDATTRURI)); + } + } est_doc_delete(doc);