yelp/yelp-2.22.0-beagle-search.patch
2008-03-31 14:31:56 +00:00

66 lines
2.1 KiB
Diff

diff -up yelp-2.22.0/configure.in.beagle-search yelp-2.22.0/configure.in
--- yelp-2.22.0/configure.in.beagle-search 2008-03-31 10:20:10.000000000 -0400
+++ yelp-2.22.0/configure.in 2008-03-31 10:20:10.000000000 -0400
@@ -133,7 +133,12 @@ dnl ******
dnl beagle
dnl ******
-BEAGLE_MODULES="libbeagle-0.0 >= 0.2.4"
+BEAGLE_MODULES=
+if $PKG_CONFIG --exists libbeagle-1.0; then
+ BEAGLE_MODULES="libbeagle-1.0 >= 0.3.0"
+else
+ BEAGLE_MODULES="libbeagle-0.0 >= 0.2.4"
+fi
AC_ARG_WITH([search],
[AC_HELP_STRING([--with-search=basic|beagle|auto],
diff -up yelp-2.22.0/configure.beagle-search yelp-2.22.0/configure
--- yelp-2.22.0/configure.beagle-search 2008-03-31 10:20:41.000000000 -0400
+++ yelp-2.22.0/configure 2008-03-31 10:22:02.000000000 -0400
@@ -26663,7 +26663,12 @@ fi
-BEAGLE_MODULES="libbeagle-0.0 >= 0.2.4"
+BEAGLE_MODULES=
+if $PKG_CONFIG --exists libbeagle-1.0; then
+ BEAGLE_MODULES="libbeagle-1.0 >= 0.3.0"
+else
+ BEAGLE_MODULES="libbeagle-0.0 >= 0.2.4"
+fi
# Check whether --with-search was given.
diff -up yelp-2.22.0/src/yelp-search-parser.c.beagle-search yelp-2.22.0/src/yelp-search-parser.c
--- yelp-2.22.0/src/yelp-search-parser.c.beagle-search 2008-03-09 15:00:42.000000000 -0400
+++ yelp-2.22.0/src/yelp-search-parser.c 2008-03-31 10:20:10.000000000 -0400
@@ -314,7 +314,8 @@ check_finished (YelpSearchParser *parser
g_free (check);
xmlNewTextChild (parser->root, NULL, BAD_CAST "online1", BAD_CAST split[1]);
- parser->finished = TRUE;
+ if (parser->snippet_request_count == 0)
+ parser->finished = TRUE;
}
@@ -367,7 +368,7 @@ snippet_response (BeagleSnippetRequest *
const char *xml = beagle_snippet_response_get_snippet (response);
- if (xml == NULL) {
+ if (xml == NULL || strlen (xml) == 0) {
debug_print (DB_DEBUG, "snippet_response empty\n");
return;
}
@@ -562,7 +563,7 @@ search_parser_process_idle (YelpSearchPa
beagle_query_set_max_hits (query, 10000);
beagle_query_add_text (query, parser->search_terms);
- beagle_query_add_source (query, "documentation");
+ beagle_query_add_text (query, "source:documentation OR source:manpages");
parser->hits = g_ptr_array_new ();