svnno****@sourc*****
svnno****@sourc*****
Sat Mar 1 08:27:59 JST 2008
Revision: 3418 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3418 Author: pal_gene Date: 2008-03-01 08:27:59 +0900 (Sat, 01 Mar 2008) Log Message: ----------- * module/search/kz-hyper-estraier-search.c: don't collect time-stamp file for index_rebuild. 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-29 18:06:13 UTC (rev 3417) +++ kazehakase/trunk/module/search/kz-hyper-estraier-search.c 2008-02-29 23:27:59 UTC (rev 3418) @@ -227,7 +227,6 @@ open_db(search); } - static void kz_hyper_estraier_search_init (KzHyperEstraierSearch *search) { @@ -259,7 +258,6 @@ G_OBJECT_CLASS(parent_class)->dispose(object); } - static gchar * create_search_result_html (KzSearch *search, const gchar *text) { @@ -412,7 +410,6 @@ return g_string_free(html, FALSE); } - gchar * get_search_result_html (KzSearch *search, const gchar *text) { @@ -502,8 +499,8 @@ drop at the time */ /** * create page title from html content string - * currentlly called from only register_documents_in_path. - * @parm contents utf-8 strings that contain html contents + * currentlly called from only register_documents_in_path(). + * @param contents utf-8 strings that contain html contents * @return gchar* new allocated, should be g_free or NULL for failed parsing */ static gchar * @@ -650,8 +647,8 @@ /** * register all documents in given path - * @parm search this search class - * @parm path path to the directory contains contents to register + * @param search this search class + * @param path path to the directory contains contents to register * @return void */ //TODO:don't register image type @@ -682,6 +679,12 @@ GTime mtime; struct stat st; + /* filter for time-stamp */ + //TODO:history search result, optionalize + /* NOTE:string pointer compare is desined */ + if(path == he_search->cache_path && strcmp(file, "time-stamp") == 0) + continue; + g_file_get_contents(new_path, &contents, NULL, NULL); g_stat(new_path, &st); mtime = st.st_mtime; @@ -705,27 +708,16 @@ if (utf8_contents) { title = get_document_title(utf8_contents); - if(!title) { - // printf("fail title in %s\n", uri); - title = g_strdup(uri); - } - register_document(search, - uri, - title, - utf8_contents, - mtime); + if(!title) title = g_strdup(uri); + register_document(search, uri, title, utf8_contents, mtime); g_free(utf8_contents); g_free(title); } } else { title = get_document_title(contents); - if(!title) { - // printf("fail title in %s\n", uri); - title = g_strdup(uri); - } - register_document(search, uri, title, - contents, mtime); + if(!title) title = g_strdup(uri); + register_document(search, uri, title, contents, mtime); g_free(title); } if (encoding)