Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

* cleanup of unnecessary code (see: new yacysearch.* pages) * documentation

orbiter5484788cf31e
diff --git a/ChangeLog b/ChangeLog
index 876be2172..1e0a77205 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,11 @@ version 0.44svn
* FIXED: /xml/bookmarks/* now uses one file for private/public entries. private only with password.
* ADDED: possibility to get the ranking for a url. (Allo)
* ADDED: yacy.badwords list to filter the topwords. (Borg-0300)
+ * ADDED: new simplified yacysearch search page, accessed by the normal search interface from index.html (Orbiter)
+ * ADDED: 1-2-3 Config for simple set-up, good for new YaCy users (Orbiter)
+ * UPDATED: index write access (dht transmission, indexing, dht deletion) now completely synchronized (Orbiter)
+ * FIXED: conjunctive search was broken because of wrong data structures, fixed (Orbiter)
+ * UPDATED: more ranking attributes (Orbiter)
version 0.43
* UPDATED: new database handling of index entry objects, less IO overhead (Orbiter)
diff --git a/build.properties b/build.properties
index d2b55a063..4eebf1e7a 100644
--- a/build.properties
+++ b/build.properties
@@ -3,7 +3,7 @@ javacSource=1.4
javacTarget=1.4
# Release Configuration
-releaseVersion=0.434
+releaseVersion=0.435
releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
#releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
releaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}
diff --git a/htroot/CookieTest.html b/htroot/CookieTest.html
index 479048f22..2f55def8d 100644
--- a/htroot/CookieTest.html
+++ b/htroot/CookieTest.html
@@ -1,9 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
-<title>YaCy '#[clientname]#': Coockie - Test Page</title>
+<title>YaCy '#[clientname]#': Cookie - Test Page</title>
#%env/templates/metas.template%#
-<link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="index.rss?search=#[former]#">
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
#%env/templates/header.template%#
diff --git a/htroot/DetailedSearch.html b/htroot/DetailedSearch.html
index edf3fb2b9..82385ee6a 100644
--- a/htroot/DetailedSearch.html
+++ b/htroot/DetailedSearch.html
@@ -2,8 +2,7 @@
<html>
<head>
<title>YaCy '#[clientname]#': Search Page</title>
- #%env/templates/metas.template%#
- <link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="index.rss?search=#[former]#">
+ #%env/templates/metas.template%#
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
#%env/templates/header.template%#
diff --git a/htroot/index.rss b/htroot/index.rss
deleted file mode 100644
index a390d0ba1..000000000
--- a/htroot/index.rss
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type='text/xsl' href='/index.xsl' version='1.0'?>
-<rss version="2.0" xmlns:yacyTopwords="http://www.yacy.net/yacy/topwords">
- <channel>
- <title>Search for #[former]#</title>
- <description>Search for #[former]#</description>
- <image>
- <url>#[rssYacyImageURL]#</url>
- <title>Search for #[former]#</title>
- </image>
- #{results}#
- <item>
- <title>#[description]#</title>
- <link>#[url]#</link>
- #(snippet)#::<description>#[text]#</description>#(/snippet)#
- <pubDate>#[date]#</pubDate>
- </item>
- #{/results}#
- <yacyTopwords:topwords>
- #(combine)#
- ::
- #{words}#
- <yacyTopwords:item>
- <yacyTopwords:word>#[word]#</yacyTopwords:word>
- </yacyTopwords:item>
- #{/words}#
- #(/combine)#
- </yacyTopwords:topwords>
- </channel>
-</rss>
diff --git a/htroot/index.soap b/htroot/index.soap
deleted file mode 100644
index 5ebfe2145..000000000
--- a/htroot/index.soap
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<yacySearch>
- <yacySearchResult>
- <title>Search for #[former]#</title>
- <description>Search for #[former]#</description>
-
- <totalResultCount>#[totalcount]#</totalResultCount>
- <currentResultCount>#[linkcount]#</currentResultCount>
-
- <searchTips>
- #(combine)#::
- #{words}#<searchTip query="#[newsearch]#">#[word]#</searchTip>#{/words}#
- #(/combine)#
- </searchTips>
-
- #{results}#
- <yacySearchResultItem>
- <description>#[description]#</description>
- <link>#[url]#</link>
- <linkName>#[urlname]#</linkName>
- <date>#[date]#</date>
- <size>#[size]#</size>
- </yacySearchResultItem>
- #{/results}#
- </yacySearchResult>
-</yacySearch>
diff --git a/htroot/index.xsl b/htroot/index.xsl
deleted file mode 100644
index 7f1a00a87..000000000
--- a/htroot/index.xsl
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<?xml-stylesheet type='text/xsl' href='/rss.xsl' version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.0">
- <xsl:template match='/rss'>
- <html>
- <head>
- <title><xsl:value-of select='channel/title' /></title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <link rel="shortcut icon" href="favicon.ico" />
- <style type="text/css">
- @import "/env/style.css";
- </style>
- </head>
- <body>
- <div align="center">
- <img src="/env/grafics/kaskelix.png"/><br/>
- <h1><xsl:value-of select='channel/title' /></h1>
- </div>
- <p>
- <xsl:apply-templates select='channel/item' />
- </p>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template match='item'>
- <p>
- <b><xsl:value-of select='title'/></b><br/>
- <a href="{link}" ><xsl:value-of select='link' /></a><br/>
- <xsl:value-of select='pubDate' /><br/>
- </p>
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/htroot/simple_search.html b/htroot/simple_search.html
deleted file mode 100644
index fcdd43600..000000000
--- a/htroot/simple_search.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-<head>
-<title>YaCy '#[clientname]#': Search Page</title>
-#%env/templates/metas.template%#
-<link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="index.rss?search=#[former]#">
-</head>
-<body>
-<div align="center">
-<img src="/env/grafics/kaskelix.png"><br><b>P2P WEB SEARCH</b>
-<form action="simple_search.html" method="GET">
-<input type="text" name="search" value="#[former]#" maxlength="80"><br><input type="submit" name="Enter" value="Search"><br><br>
-Max. number of results:
-<select NAME="count">
-<option #(count-10)#::selected#(/count-10)#>10</option>
-<option #(count-50)#::selected#(/count-50)#>50</option>
-<option #(count-100)#::selected#(/count-100)#>100</option>
-<option #(count-1000)#::selected#(/count-1000)#>1000</option>
-</select>
-</form>
-</div>
-
-#(num-results)#
-::
-No Results.
-::
-No Results. (length of search words must be at least 3 characters)
-::
-<p>No Results. If you think this is unsatisfactory then you may consider to support
-the global index by running your own proxy/peer.
-If everybody contributes, the results will get better.</p>
-<p>Other possible reasons for no result:<br>
-<ul>
-<li>The search time was too short. Search again with same query to catch up 'late peers'</li>
-<li>There is currently no support for german umlaute. Please use ae/oe/ue instead</li>
-<li>Words of length < 3 are not indexed. Please omit such words</li>
-<li>YaCy tries to index singular instead of plural words. Please use the singular form</li>
-<li>Only complete words are indexed, not parts of words</li>
-<li>Don't use stopwords as search words</li>
-<li>During this test phase the reaction time of remote peers is unknown.
-Please repeat your search to see if there are late-responses from remote peers</li>
-</ul></p>
-<p>If you think the information you searched should exist in the global index,
-then please run your own peer and start a crawl of your wanted information to make it
-available for everyone. Then stay online to support crawls from other peers. Thank you!</p>
-::
-#[linkcount]# results from a total number of #[totalcount]# known links.
-You can try to
-<a href="/simple_search.html?search=#[former]#&Enter=Search&count=#[count]#&order=#[order]#&resource=#[resource]#&time=#[time]#&urlmaskfilter=.*">catch up more links</a>
-from 'late' peers to enrich this search result.
-#(/num-results)#
-<p>
-<!-- linklist begin -->
-
-#{results}#
-<!-- link begin -->
-<p><b>
-#[description]#
-</b><br>
-<a href="#[url]#">#[urlname]#</a><br>
-#[date]#<br></p>
-<!-- link end -->
-#{/results}#
-
-<!-- linklist end -->
-</body>
-</html>
\ No newline at end of file
diff --git a/htroot/simple_search.java b/htroot/simple_search.java
deleted file mode 100644
index f2d451652..000000000
--- a/htroot/simple_search.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// simple_search.java
-// -----------------------
-// part of the AnomicHTTPD caching proxy
-// (C) by Michael Peter Christen; [email protected]
-// first published on http://www.anomic.de
-// Frankfurt, Germany, 2004
-// This file is contribued by Alexander Schier
-// last major change: 12.07.2003
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// Using this software in any meaning (reading, learning, copying, compiling,
-// running) means that you agree that the Author(s) is (are) not responsible
-// for cost, loss of data or any harm that may be caused directly or indirectly
-// by usage of this softare or this documentation. The usage of this software
-// is on your own risk. The installation and usage (starting/running) of this
-// software may allow other people or application to access your computer and
-// any attached devices and is highly dependent on the configuration of the
-// software which must be done by the user of the software; the author(s) is
-// (are) also not responsible for proper configuration and usage of the
-// software, even if provoked by documentation provided together with
-// the software.
-//
-// Any changes to this file according to the GPL as documented in the file
-// gpl.txt aside this file in the shipment you received can be done to the
-// lines that follows this copyright notice here, but changes must not be
-// done inside the copyright notive above. A re-distribution must contain
-// the intact and unchanged copyright notice.
-// Contributions and changes to the program code must be marked as such.
-
-
-// You must compile this file with
-// javac -classpath .:../classes index.java
-// if the shell's current path is HTROOT
-
-
-import java.io.File;
-import de.anomic.server.serverObjects;
-import de.anomic.server.serverSwitch;
-import de.anomic.http.httpHeader;
-import de.anomic.server.serverClassLoader;
-
-/**
- * Wrapper to index.java
- */
-public class simple_search{
- public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) throws Exception{
- serverClassLoader provider = new serverClassLoader();
- try{
- Class index = provider.loadClass(new File("htroot/index.class"));
- Class[] params = new Class[]{
- Class.forName("de.anomic.http.httpHeader"),
- Class.forName("de.anomic.server.serverObjects"),
- Class.forName("de.anomic.server.serverSwitch")
- };
- return (serverObjects)index.getMethod("respond", params).invoke(null, new Object[] {header, post, env});
- }catch(ClassNotFoundException e){
- return new serverObjects();
- }catch(NoSuchMethodException e){
- return new serverObjects();
- }catch(IllegalAccessException e){
- return new serverObjects();
- }
-
- }
-}
diff --git a/htroot/websearch.html b/htroot/websearch.html
deleted file mode 100644
index 3b06405d3..000000000
--- a/htroot/websearch.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
- <head>
- <title>YaCy '#[clientname]#': Result Page</title>
- #%env/templates/metas.template%#
- <link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="index.rss?search=#[former]#">
-
- <script src="/js/ajax.js"></script>
- <script src="/js/xml.js"></script>
- <script src="/js/Index.js"></script>
-
- </head>
- <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
-#%env/templates/header.template%#
-
- <SCRIPT LANGUAGE="JavaScript">
-picEmpty = new Image(11, 11);
-picEmpty.src = "/env/grafics/empty.gif";
-picMinus = new Image(11, 11);
-picMinus.src = "/env/grafics/minus.gif";
-picPlus = new Image(11, 11);
-picPlus.src = "/env/grafics/plus.gif";
- </SCRIPT>
-
- <form action="websearch.html" method="get">
- <center>
- <p>
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td rowspan="2">
- <img border="0" src="/env/grafics/yacy.png" align="top">
- </td>
- <td rowspan="2" width="5px"></td>
- <td align="center"><h2><font color="#212942" face="Helvetica, Arial" size="2">P2P WEB SEARCH</font></h2></td>
- <td rowspan="2" width="5px">
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td>
- <input name="search" type="text" size="52" maxlength="80" value="#[former]#">
- </td>
- <td>
- <input type="submit" name="Enter" value="Search">
- </td>
- </tr>
- </table>
-
- </center>
- </form>
- </p>
-
- <hr>
-
- <p>
-#(excluded)#
-::
-<b>The following words are stop-words and had been excluded from the search: #[stopwords]#.</b>
-#(/excluded)#
-#(num-results)#
-<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
-::
-No Results.
-::
-No Results. (length of search words must be at least 3 characters)
-::
-<p>No Results. If you think this is unsatisfactory then you may consider to support the global index by running your own proxy/peer.
-If everybody contributes, the results will get better.</p>
-<p>Other possible reasons for no result:<br>
-<ul>
-<li>The search time was too short. Search again with same query to catch up 'late peers'</li>
-<li>There is currently no support for german umlaute. Please use ae/oe/ue instead</li>
-<li>Words of length < 3 are not indexed. Please omit such words</li>
-<li>YaCy tries to index singular instead of plural words. Please use the singular form</li>
-<li>Only complete words are indexed, not parts of words</li>
-<li>Don't use stopwords as search words</li>
-<li>During this test phase the reaction time of remote peers is unknown.
-Please repeat your search to see if there are late-responses from remote peers</li>
-</ul></p>
-<p>If you think the information you searched should exist in the global index,
-then please run your own peer and start a crawl of your wanted information to make it
-available for everyone. Then stay online to support crawls from other peers. Thank you!</p>
-::
-<b>#[linkcount]#</b> results from <b>#[orderedcount]#</b> ordered links of a total number of <b>#[totalcount]#</b> known.
-&rarr; <a href="/websearch.html?search=#[former]#&Enter=Search&count=#[count]#&order=#[order]#&resource=#[resource]#&time=#[time]#&urlmaskfilter=.*">Catch up more links</a>
-from 'late' peers.
-#(/num-results)#
-#(combine)#
-::
-<br><br><b>Topwords</b> (to refine search):
-#{words}#
-<a href="websearch.html?search=#[newsearch]#&Enter=Search&count=#[count]#&order=#[order]#&resource=#[resource]#&time=#[time]#">#[word]#</a>
-#{/words}#
-#(/combine)#
-</p>
-<!-- linklist begin -->
-
-#{results}#
-<!-- link begin -->
-<p style="border-bottom:1px #000 dashed; padding-bottom: 1em;">
-<a href="/Bookmarks_p.html?edit=#[urlhash]#" onMouseover="document.plus_#[urlhexhash]#.src=picPlus.src" onMouseout="document.plus_#[urlhexhash]#.src=picEmpty.src">
-<img src="/env/grafics/empty.gif" title="bookmark" alt="bookmark" name="plus_#[urlhexhash]#" border="0"></a>
-<span class="ResultDescription">#[description]#</span><br>
-<a href="#[delete]#" onMouseover="document.minus_#[urlhexhash]#.src=picMinus.src" onMouseout="document.minus_#[urlhexhash]#.src=picEmpty.src">
-<img src="/env/grafics/empty.gif" title="delete" alt="delete" name="minus_#[urlhexhash]#" border="0"></a>
-<span class="#(snippet)#snippetLoading::snippetLoaded#(/snippet)#" id="#[urlhash]#">#(snippet)#loading snippet ...::#[text]##(/snippet)#</span><br>
-<img src="/env/grafics/empty.gif" border="0">&nbsp;<a id="url#[urlhash]#" href="#[url]#">#[urlname]#</a><br>
-<img src="/env/grafics/empty.gif"><span class="ResultDateYBR">&nbsp;#[date]#</span> | <span class="ResultDateYBR">YBR-#[ybr]#</span> | <a href="ViewFile.html?urlHash=#[urlhash]#&words=#[words]#">Info</a><br>
-</p>
-<!-- link end -->
-#{/results}#
-
-<!-- linklist end -->
-<p>
-#(resultbottomline)#
-::
-The global search resulted in #[globalresults]# link contributions from other YaCy peers.
-::
-You can enrich the search results by using the 'global' option: This will search also other YaCy peers
-::
-You cannot get global search results because you are not connected to another YaCy peer.
-To connect you must first use the proxy.
-See here for an <a href="http://www.anomic.de/AnomicHTTPProxy/Installation.html#wininst">installation guide</a>.
-Alternatively, you can run the proxy in permanent online mode, which also grants global search.
-To do this, press this button:
-<form action="SettingsAck_p.html" method="get">
-<input type="submit" name="pmode" value="go online">
-</form>
-::
-You can enrich the search results by using the 'global' option; you must also switch to online mode
-(by using the proxy) to contribute to the global index.
-#(/resultbottomline)#
-</p><br>
-<hr>
-<center><i>YaCy is a GPL'ed project
-with the target of implementing a P2P-based global search engine.<br>
-Architecture (C) by Michael Peter Christen,
-<img src="/env/grafics/mcemailh.gif"></i></center>
-
-#%env/templates/footer.template%#
-
-<script language="JavaScript">
-
-AllSnippets();
-
-</script>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/htroot/websearch.java b/htroot/websearch.java
deleted file mode 100644
index 01943c68f..000000000
--- a/htroot/websearch.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// simple_search.java
-// -----------------------
-// part of the AnomicHTTPD caching proxy
-// (C) by Michael Peter Christen; [email protected]
-// first published on http://www.anomic.de
-// Frankfurt, Germany, 2004
-// This file is contribued by Alexander Schier
-// last major change: 12.07.2003
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// Using this software in any meaning (reading, learning, copying, compiling,
-// running) means that you agree that the Author(s) is (are) not responsible
-// for cost, loss of data or any harm that may be caused directly or indirectly
-// by usage of this softare or this documentation. The usage of this software
-// is on your own risk. The installation and usage (starting/running) of this
-// software may allow other people or application to access your computer and
-// any attached devices and is highly dependent on the configuration of the
-// software which must be done by the user of the software; the author(s) is
-// (are) also not responsible for proper configuration and usage of the
-// software, even if provoked by documentation provided together with
-// the software.
-//
-// Any changes to this file according to the GPL as documented in the file
-// gpl.txt aside this file in the shipment you received can be done to the
-// lines that follows this copyright notice here, but changes must not be
-// done inside the copyright notive above. A re-distribution must contain
-// the intact and unchanged copyright notice.
-// Contributions and changes to the program code must be marked as such.
-
-
-// You must compile this file with
-// javac -classpath .:../classes index.java
-// if the shell's current path is HTROOT
-
-
-import java.io.File;
-import de.anomic.server.serverObjects;
-import de.anomic.server.serverSwitch;
-import de.anomic.http.httpHeader;
-import de.anomic.server.serverClassLoader;
-
-/**
- * Wrapper to index.java
- */
-public class websearch{
- public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) throws Exception{
- serverClassLoader provider = new serverClassLoader();
- try{
- Class index = provider.loadClass(new File("htroot/index.class"));
- Class[] params = new Class[]{
- Class.forName("de.anomic.http.httpHeader"),
- Class.forName("de.anomic.server.serverObjects"),
- Class.forName("de.anomic.server.serverSwitch")
- };
- return (serverObjects)index.getMethod("respond", params).invoke(null, new Object[] {header, post, env});
- }catch(ClassNotFoundException e){
- return new serverObjects();
- }catch(NoSuchMethodException e){
- return new serverObjects();
- }catch(IllegalAccessException e){
- return new serverObjects();
- }
-
- }
-}
diff --git a/htroot/xhtml-index.html b/htroot/xhtml-index.html
index 6efb2ed44..1dab4d829 100644
--- a/htroot/xhtml-index.html
+++ b/htroot/xhtml-index.html
@@ -3,7 +3,7 @@
<head>
<title>YaCy '#[clientname]#': Search Page</title>
#%env/templates/xhtml-metas.template%#
- <link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="index.rss?search=#[former]#" />
+ <link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="yacysearch.rss?search=#[former]#" />
<script src="/js/ajax.js" type="text/javascript"></script>
<script src="/js/xml.js" type="text/javascript"></script>