- fix opensearch discover err msg - webgraph not enabled - if no opensearchdescription link found in index

- remove search2.net from sample config (is down)
This commit is contained in:
reger 2013-04-04 00:40:59 +02:00
parent 6a9d0b60a3
commit e89491271f
2 changed files with 4 additions and 3 deletions

View File

@ -12,7 +12,6 @@
## - all lines beginning with '#' and where the second character is not '#' are commented-out keyword lines
##
#Nutch = http://www.search2.net/opensearch?query={searchTerms} # get 20 results from Nutch
#Blekko = http://blekko.com/ws/{searchTerms}+/rss # get 20 results from blekko
#Faroo-Web = http://www.faroo.com/instant.rss?q={searchTerms}&start={startIndex}&length={count}&l=en&src=web # get results from Faroo web-search
#Faroo-News = http://www.faroo.com/instant.rss?q={searchTerms}&start={startIndex}&length=20&l=en&src=news # get results from Faroo news-search

View File

@ -174,6 +174,8 @@ public class OpenSearchConnector {
* Discover opensearch description links from local (embedded) Solr index using
* meta data field 'outboundlinks_tag_txt' and add found systems to the
* config file
*
* @return true if background discover job was started, false if job not started
*/
public boolean discoverFromSolrIndex(final Switchboard sb) {
if (sb == null) {
@ -182,7 +184,7 @@ public class OpenSearchConnector {
final SolrConnector connector = sb.index.fulltext().getWebgraphConnector();
// check if needed Solr fields are available (selected)
if (connector == null) {
Log.logSevere("OpenSearchConnector.Discover", "Error on connecting to embedded Solr index");
Log.logSevere("OpenSearchConnector.Discover", "Error on connecting to embedded Solr webgraph index");
return false;
}
final boolean metafieldavailable = sb.index.fulltext().getWebgraphConfiguration().contains(WebgraphSchema.target_rel_s.name())
@ -203,7 +205,7 @@ public class OpenSearchConnector {
numfound = docList.getNumFound();
if (numfound == 0) {
Log.logInfo("OpenSearchConnector.Discover", "no results found, abort discover job");
return false;
return true;
}
Log.logInfo("OpenSearchConnector.Discover", "start checking " + Long.toString(numfound) + " found index results");
} catch (IOException ex) {