print-out of links that result from contraint-filtering

in search result

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3078 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent f4737eebd6
commit ee3d91cb6b

@ -1,214 +1,192 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>YaCy '#[clientname]#': Search Page</title> <title>YaCy '#[clientname]#': Search Page</title>
#%env/templates/metas.template%# #%env/templates/metas.template%#
<link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="yacysearch.rss?search=#[former]#" /> <link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="yacysearch.rss?search=#[former]#" />
<script type="text/javascript" src="/js/ajax.js"></script> <script type="text/javascript" src="/js/ajax.js"></script>
<script type="text/javascript" src="/js/xml.js"></script> <script type="text/javascript" src="/js/xml.js"></script>
<script type="text/javascript" src="/js/yacysearch.js"></script> <script type="text/javascript" src="/js/yacysearch.js"></script>
</head> </head>
<body id="yacysearch" onload="document.getElementById('search').focus()"> <body id="yacysearch" onload="document.getElementById('search').focus()">
#(display)# #(display)#
#%env/templates/simpleheader.template%# #%env/templates/simpleheader.template%#
:: ::
#%env/templates/header.template%# #%env/templates/header.template%#
#(/display)# #(/display)#
<form class="search small" name="searchform" action="yacysearch.html" method="get"> <form class="search small" name="searchform" action="yacysearch.html" method="get">
<p class="yacylogo"><a href="http://yacy.net/yacy/" class="yacylogo"><img src="/env/grafics/yacy.png" alt="yacy" /></a></p> <p class="yacylogo"><a href="http://yacy.net/yacy/" class="yacylogo"><img src="/env/grafics/yacy.png" alt="yacy" /></a></p>
<h2>#[promoteSearchPageGreeting]#</h2> <h2>#[promoteSearchPageGreeting]#</h2>
<fieldset class="maininput"> <fieldset class="maininput">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="80%"> <tr><td width="80%">
<input name="search" type="text" size="50" maxlength="80" value="#[former]#" onClick='document.searchform.Enter.value = "Search"' /> <input name="search" type="text" size="50" maxlength="80" value="#[former]#" onClick='document.searchform.Enter.value = "Search"' />
<input type="submit" name="Enter" value="Search" /> <input type="submit" name="Enter" value="Search" />
</td><td width="20%"> </td><td width="20%">
<a href="index.html?display=#[display]#&searchoptions=1&count=#[count]#&order=#[order]#&resource=#[resource]#&time=#[time]#&urlmaskfilter=#[urlmaskfilter]#&prefermaskfilter=#[prefermaskfilter]#&cat=#[cat]#&type=#[type]#&constraint=#[constraint]#&contentdom=#[contentdom]#&former=#[former]#">more options<a> <a href="index.html?display=#[display]#&searchoptions=1&count=#[count]#&order=#[order]#&resource=#[resource]#&time=#[time]#&urlmaskfilter=#[urlmaskfilter]#&prefermaskfilter=#[prefermaskfilter]#&cat=#[cat]#&type=#[type]#&constraint=#[constraint]#&contentdom=#[contentdom]#&former=#[former]#">more options<a>
</td></tr> </td></tr>
<tr><td width="100%" colspan="2"> <tr><td width="100%" colspan="2">
<input type="radio" name="contentdom" value="text" #(contentdomCheckText)#::checked="checked"#(/contentdomCheckText)# />Text&nbsp;&nbsp; <input type="radio" name="contentdom" value="text" #(contentdomCheckText)#::checked="checked"#(/contentdomCheckText)# />Text&nbsp;&nbsp;
<input type="radio" name="contentdom" value="image" #(contentdomCheckImage)#::checked="checked"#(/contentdomCheckImage)# />Images&nbsp;&nbsp; <input type="radio" name="contentdom" value="image" #(contentdomCheckImage)#::checked="checked"#(/contentdomCheckImage)# />Images&nbsp;&nbsp;
<input type="radio" name="contentdom" value="audio" #(contentdomCheckAudio)#::checked="checked"#(/contentdomCheckAudio)# />Audio&nbsp;&nbsp; <input type="radio" name="contentdom" value="audio" #(contentdomCheckAudio)#::checked="checked"#(/contentdomCheckAudio)# />Audio&nbsp;&nbsp;
<input type="radio" name="contentdom" value="video" #(contentdomCheckVideo)#::checked="checked"#(/contentdomCheckVideo)# />Video&nbsp;&nbsp; <input type="radio" name="contentdom" value="video" #(contentdomCheckVideo)#::checked="checked"#(/contentdomCheckVideo)# />Video&nbsp;&nbsp;
<input type="radio" name="contentdom" value="app" #(contentdomCheckApp)#::checked="checked"#(/contentdomCheckApp)# />Applications <input type="radio" name="contentdom" value="app" #(contentdomCheckApp)#::checked="checked"#(/contentdomCheckApp)# />Applications
</td></tr> </td></tr>
</table> </table>
<input type="hidden" name="former" value="#[former]#" /> <input type="hidden" name="former" value="#[former]#" />
<input type="hidden" name="count" value="#[count]#" /> <input type="hidden" name="count" value="#[count]#" />
<input type="hidden" name="order" value="#[order]#" /> <input type="hidden" name="order" value="#[order]#" />
<input type="hidden" name="resource" value="#[resource]#" /> <input type="hidden" name="resource" value="#[resource]#" />
<input type="hidden" name="time" value="#[time]#" /> <input type="hidden" name="time" value="#[time]#" />
<input type="hidden" name="urlmaskfilter" value="#[urlmaskfilter]#" /> <input type="hidden" name="urlmaskfilter" value="#[urlmaskfilter]#" />
<input type="hidden" name="prefermaskfilter" value="#[prefermaskfilter]#" /> <input type="hidden" name="prefermaskfilter" value="#[prefermaskfilter]#" />
<input type="hidden" name="depth" value="#[depth]#" /> <input type="hidden" name="depth" value="#[depth]#" />
<input type="hidden" name="cat" value="#[cat]#" /> <input type="hidden" name="cat" value="#[cat]#" />
<input type="hidden" name="type" value="#[type]#" /> <input type="hidden" name="type" value="#[type]#" />
<input type="hidden" name="display" value="#[display]#" /> <input type="hidden" name="display" value="#[display]#" />
<input type="hidden" name="constraint" value="#[constraint]#" /> <input type="hidden" name="constraint" value="#[constraint]#" />
</fieldset> </fieldset>
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
document.searchform.Enter.value = "search again - catch up more links"; document.searchform.Enter.value = "search again - catch up more links";
</script> </script>
#(type)# <!-- show information about search key handling -->
<!-- type 0: text search -->
#(excluded)# #(excluded)#
:: ::
<p><strong>The following words are stop-words and had been excluded from the search: #[stopwords]#.</strong></p> <p><strong>The following words are stop-words and had been excluded from the search: #[stopwords]#.</strong></p>
#(/excluded)# #(/excluded)#
#(num-results)#
::
<p>No Results.</p>
::
<p>No Results. (length of search words must be at least 3 characters)</p>
::
<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:<p>
<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 &lt; 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>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>
::
<p><strong>#[linkcount]#</strong> results from <strong>#[orderedcount]#</strong> ordered links of a total number of <strong>#[totalcount]#</strong> known.</p>
#(/num-results)#
#(combine)#
::
<p><strong>Refine your search with these topwords</strong>:</p>
<p>
#{words}#
<a href="yacysearch.html?search=#[newsearch]#&amp;Enter=Search&amp;count=#[count]#&amp;order=#[order]#&amp;resource=#[resource]#&amp;time=#[time]#">#[word]#</a>
#{/words}#
</p>
#(/combine)#
<!-- linklist begin -->
#{results}#
<!-- link begin -->
<div class="searchresults">
<div class="urlactions">
<a href="/Bookmarks.html?edit=#[urlhash]#" class="bookmarklink" title="bookmark"><img src="/env/grafics/empty.gif" title="bookmark" alt="bookmark" class="bookmarkIcon" /></a>
#(recommend)#
<img src="/env/grafics/empty.gif" title="" alt="" class="recommendIcon" />
<img src="/env/grafics/empty.gif" title="" alt="" class="deleteIcon" />
::
<a href="#[recommendlink]#" class="recommendlink" title="recommend"><img src="/env/grafics/empty.gif" title="recommend" alt="recommend" class="recommendIcon" /></a>
<a href="#[deletelink]#" title="delete" class="deletelink" ><img src="/env/grafics/empty.gif" title="delete" alt="delete" class="deleteIcon" /></a>
#(/recommend)#
</div>
<h4 class="linktitle"><a href="#[url]#">#[description]#</a></h4>
<p class="snippet"><span class="#(snippet)#snippetLoading::snippetLoaded#(/snippet)#" id="#[urlhash]#">#(snippet)#loading snippet ...::#[text]##(/snippet)#</span></p>
<p class="url"><a href="#[url]#" id="url#[urlhash]#">#[urlname]#</a></p>
<p class="urlinfo">#[date]# | YBR-#[ybr]# | <a href="ViewFile.html?urlHash=#[urlhash]#&amp;words=#[words]#">Info</a> | <a href="yacysearch.html?cat=image&amp;url=#[url]#&amp;search=#[former]#">Pictures</a></p>
</div>
<!-- link end -->
#{/results}#
<script type="text/javascript">
AllTextSnippets();
addHover();
</script>
<!-- linklist end --> <!-- type the number of results -->
<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:</p>
<form action="SettingsAck_p.html" method="get">
<input type="submit" name="pmode" value="go online">
</form>
<p>
::
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>
::<!-- type 1: media search -->
#(excluded)#
::
<p><strong>The following words are stop-words and had been excluded from the search: #[stopwords]#.</strong></p>
#(/excluded)#
#(num-results)# #(num-results)#
:: ::
<p>No Results.</p> <p>No Results.</p>
:: ::
<p>No Results. (length of search words must be at least 3 characters)</p> <p>No Results. (length of search words must be at least 3 characters)</p>
:: ::
<p>No Results. If you think this is unsatisfactory then you may consider to support the global index by running your own proxy/peer. <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> If everybody contributes, the results will get better.</p>
<p>Other possible reasons for no result:<p> <p>Other possible reasons for no result:<p>
<ul> <ul>
<li>The search time was too short. Search again with same query to catch up 'late peers'</li> <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>There is currently no support for german umlaute. Please use ae/oe/ue instead</li>
<li>Words of length &lt; 3 are not indexed. Please omit such words</li> <li>Words of length &lt; 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>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>Only complete words are indexed, not parts of words</li>
<li>Don't use stopwords as search words</li> <li>Don't use stopwords as search words</li>
<li>During this test phase the reaction time of remote peers is unknown. <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> Please repeat your search to see if there are late-responses from remote peers</li>
</ul> </ul>
<p>If you think the information you searched should exist in the global index, <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 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> available for everyone. Then stay online to support crawls from other peers. Thank you!</p>
:: ::
<p><strong>#[linkcount]#</strong> results from <strong>#[orderedcount]#</strong> ordered links of a total number of <strong>#[totalcount]#</strong> known.</p> <p><strong>#[linkcount]#</strong> results from <strong>#[orderedcount]#</strong> ordered links from <strong>#[filteredcount]#</strong> filtered links of a total number of <strong>#[totalcount]#</strong> known.</p>
#(/num-results)# #(/num-results)#
<!-- linklist begin -->
#{results}#
<!-- link begin -->
<span class="snippetLoading" id="#[urlhash]#">loading snippet from <a href="#[url]#" id="url#[urlhash]#">#[urlname]#</a><br /></span>
<!-- link end -->
#{/results}#
<script type="text/javascript">
AllMediaSnippets();
addHover();
</script>
<!-- linklist end --> <!-- view the result list -->
::<!-- type 2: image serch: presents image thumbnails --> #(type)#
::<!-- type 3: image thumbnail list for one single url --> <!-- type 0: text search -->
<table border="0" cellspacing="16" cellpadding="0"> #(combine)#
#{results}# ::
<tr valign="bottom"> <p><strong>Refine your search with these topwords</strong>:</p>
#{line}# <p>
<td> #{words}#
<a href="#[url]#"><img src="/ViewImage.png?maxwidth=96&amp;maxheight=96&amp;url=#[url]#" /></a><br /><a href="#[url]#">#[name]#</a> <a href="yacysearch.html?search=#[newsearch]#&amp;Enter=Search&amp;count=#[count]#&amp;order=#[order]#&amp;resource=#[resource]#&amp;time=#[time]#">#[word]#</a>
</td> #{/words}#
#{/line}# </p>
</tr> #(/combine)#
#{/results}# <!-- linklist begin -->
</table>
#{results}#
<!-- link begin -->
<div class="searchresults">
<div class="urlactions">
<a href="/Bookmarks.html?edit=#[urlhash]#" class="bookmarklink" title="bookmark"><img src="/env/grafics/empty.gif" title="bookmark" alt="bookmark" class="bookmarkIcon" /></a>
#(recommend)#
<img src="/env/grafics/empty.gif" title="" alt="" class="recommendIcon" />
<img src="/env/grafics/empty.gif" title="" alt="" class="deleteIcon" />
::
<a href="#[recommendlink]#" class="recommendlink" title="recommend"><img src="/env/grafics/empty.gif" title="recommend" alt="recommend" class="recommendIcon" /></a>
<a href="#[deletelink]#" title="delete" class="deletelink" ><img src="/env/grafics/empty.gif" title="delete" alt="delete" class="deleteIcon" /></a>
#(/recommend)#
</div>
<h4 class="linktitle"><a href="#[url]#">#[description]#</a></h4>
<p class="snippet"><span class="#(snippet)#snippetLoading::snippetLoaded#(/snippet)#" id="#[urlhash]#">#(snippet)#loading snippet ...::#[text]##(/snippet)#</span></p>
<p class="url"><a href="#[url]#" id="url#[urlhash]#">#[urlname]#</a></p>
<p class="urlinfo">#[date]# | YBR-#[ybr]# | <a href="ViewFile.html?urlHash=#[urlhash]#&amp;words=#[words]#">Info</a> | <a href="yacysearch.html?cat=image&amp;url=#[url]#&amp;search=#[former]#">Pictures</a></p>
</div>
<!-- link end -->
#{/results}#
<script type="text/javascript">
AllTextSnippets();
addHover();
</script>
<!-- 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:</p>
<form action="SettingsAck_p.html" method="get">
<input type="submit" name="pmode" value="go online">
</form>
<p>
::
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>
::<!-- type 1: media search -->
<!-- linklist begin -->
#{results}#
<!-- link begin -->
<span class="snippetLoading" id="#[urlhash]#">loading snippet from <a href="#[url]#" id="url#[urlhash]#">#[urlname]#</a><br /></span>
<!-- link end -->
#{/results}#
<script type="text/javascript">
AllMediaSnippets();
addHover();
</script>
<!-- linklist end -->
::<!-- type 2: image serch: presents image thumbnails -->
::<!-- type 3: image thumbnail list for one single url -->
<table border="0" cellspacing="16" cellpadding="0">
#{results}#
<tr valign="bottom">
#{line}#
<td>
<a href="#[url]#"><img src="/ViewImage.png?maxwidth=96&amp;maxheight=96&amp;url=#[url]#" /></a><br /><a href="#[url]#">#[name]#</a>
</td>
#{/line}#
</tr>
#{/results}#
</table>
#(/type)# #(/type)#
<p class="info"> <p class="info">
YaCy is a GPL'ed project with the target of implementing a P2P-based global search engine.<br /> 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" alt="Mail-Adresse von Michael Peter Christen" /> Architecture (C) by Michael Peter Christen, <img src="/env/grafics/mcemailh.gif" alt="Mail-Adresse von Michael Peter Christen" />
</p> </p>
#(display)# #(display)#
#%env/templates/simplefooter.template%# #%env/templates/simplefooter.template%#
:: ::
#%env/templates/footer.template%# #%env/templates/footer.template%#
#(/display)# #(/display)#
</body> </body>

@ -281,28 +281,23 @@ public class yacysearch {
// process result of search // process result of search
prop.put("type_resultbottomline", 0); prop.put("type_resultbottomline", 0);
if (filtered.size() > 0) { if (filtered.size() > 0) {
prop.put("type_excluded", 1); prop.put("excluded", 1);
prop.put("type_excluded_stopwords", filtered.toString()); prop.put("excluded_stopwords", filtered.toString());
} else { } else {
prop.put("type_excluded", 0); prop.put("excluded", 0);
} }
if (prop == null || prop.size() == 0) { if (prop == null || prop.size() == 0) {
if (post.get("search", "").length() < 3) { if (post.get("search", "").length() < 3) {
prop.put("type_num-results", 2); // no results - at least 3 chars prop.put("num-results", 2); // no results - at least 3 chars
} else { } else {
prop.put("type_num-results", 1); // no results prop.put("num-results", 1); // no results
} }
} else { } else {
final int linkcount = Integer.parseInt(prop.get("type_linkcount", "0")); final int totalcount = Integer.parseInt(prop.get("num-results_totalcount", "0"));
final int orderedcount = Integer.parseInt(prop.get("type_orderedcount", "0")); if (totalcount >= 10) {
final int totalcount = Integer.parseInt(prop.get("type_totalcount", "0")); final Object[] references = (Object[]) prop.get( "references", new String[0]);
if (totalcount > 10) { prop.put("num-results", 4);
final Object[] references = (Object[]) prop.get( "type_references", new String[0]);
prop.put("type_num-results", 4);
prop.put("type_num-results_linkcount", linkcount);
prop.put("type_num-results_orderedcount", orderedcount);
prop.put("type_num-results_totalcount", totalcount);
int hintcount = references.length; int hintcount = references.length;
if (hintcount > 0) { if (hintcount > 0) {
@ -346,12 +341,9 @@ public class yacysearch {
} }
} else { } else {
if (totalcount == 0) { if (totalcount == 0) {
prop.put("type_num-results", 3); // long prop.put("num-results", 3); // long
} else { } else {
prop.put("type_num-results", 4); prop.put("num-results", 4);
prop.put("type_num-results_linkcount", linkcount);
prop.put("type_num-results_orderedcount", orderedcount);
prop.put("type_num-results_totalcount", totalcount);
} }
} }
} }

@ -198,7 +198,6 @@ public final class plasmaSearchEvent extends Thread implements Runnable {
plasmaSearchResult result = orderFinal(rcLocal); plasmaSearchResult result = orderFinal(rcLocal);
if (result != null) { if (result != null) {
result.globalContributions = globalContributions; result.globalContributions = globalContributions;
result.localContributions = (rcLocal == null) ? 0 : rcLocal.size();
// flush results in a separate thread // flush results in a separate thread
this.start(); // start to flush results this.start(); // start to flush results
@ -212,7 +211,7 @@ public final class plasmaSearchEvent extends Thread implements Runnable {
Map searchContainerMap = localSearchContainers(null); Map searchContainerMap = localSearchContainers(null);
indexContainer rcLocal = (searchContainerMap == null) ? wordIndex.emptyContainer(null) : localSearchJoin(searchContainerMap.values()); indexContainer rcLocal = (searchContainerMap == null) ? wordIndex.emptyContainer(null) : localSearchJoin(searchContainerMap.values());
plasmaSearchResult result = orderFinal(rcLocal); plasmaSearchResult result = orderFinal(rcLocal);
result.localContributions = rcLocal.size(); result.globalContributions = 0;
// return search result // return search result
log.logFine("SEARCHRESULT: " + profileLocal.reportToString()); log.logFine("SEARCHRESULT: " + profileLocal.reportToString());
@ -378,9 +377,7 @@ public final class plasmaSearchEvent extends Thread implements Runnable {
long postorderLimitTime = (postorderTime < 0) ? Long.MAX_VALUE : (System.currentTimeMillis() + postorderTime); long postorderLimitTime = (postorderTime < 0) ? Long.MAX_VALUE : (System.currentTimeMillis() + postorderTime);
profileLocal.startTimer(); profileLocal.startTimer();
plasmaSearchResult acc = new plasmaSearchResult(query, ranking); plasmaSearchResult acc = new plasmaSearchResult(query, ranking);
//if (searchResult == null) return acc; // strange case where searchResult is not proper: acc is then empty
//if (searchResult.size() == 0) return acc; // case that we have nothing to do
indexRWIEntryNew entry; indexRWIEntryNew entry;
indexURLEntry page; indexURLEntry page;
Long preranking; Long preranking;
@ -432,6 +429,8 @@ public final class plasmaSearchEvent extends Thread implements Runnable {
profileLocal.setYieldTime(plasmaSearchTimingProfile.PROCESS_FILTER); profileLocal.setYieldTime(plasmaSearchTimingProfile.PROCESS_FILTER);
profileLocal.setYieldCount(plasmaSearchTimingProfile.PROCESS_FILTER, acc.sizeOrdered()); profileLocal.setYieldCount(plasmaSearchTimingProfile.PROCESS_FILTER, acc.sizeOrdered());
acc.localContributions = (rcLocal == null) ? 0 : rcLocal.size();
acc.filteredResults = preorder.filteredCount();
return acc; return acc;
} }

@ -65,6 +65,7 @@ public final class plasmaSearchPreOrder {
private TreeMap pageAcc; // key = order hash; value = plasmaLURL.entry private TreeMap pageAcc; // key = order hash; value = plasmaLURL.entry
private plasmaSearchQuery query; private plasmaSearchQuery query;
private plasmaSearchRankingProfile ranking; private plasmaSearchRankingProfile ranking;
private int filteredCount;
public plasmaSearchPreOrder() { public plasmaSearchPreOrder() {
this.entryMin = null; this.entryMin = null;
@ -109,6 +110,11 @@ public final class plasmaSearchPreOrder {
} }
pageAcc.put(serverCodings.encodeHex(Long.MAX_VALUE - this.ranking.preRanking(iEntry.generateNormalized(this.entryMin, this.entryMax), query.words("")), 16) + iEntry.urlHash(), iEntry); pageAcc.put(serverCodings.encodeHex(Long.MAX_VALUE - this.ranking.preRanking(iEntry.generateNormalized(this.entryMin, this.entryMax), query.words("")), 16) + iEntry.urlHash(), iEntry);
} }
this.filteredCount = pageAcc.size();
}
public int filteredCount() {
return this.filteredCount;
} }
public void remove(boolean rootDomExt, boolean doubleDom) { public void remove(boolean rootDomExt, boolean doubleDom) {

@ -67,6 +67,7 @@ public final class plasmaSearchResult {
private plasmaSearchRankingProfile ranking; private plasmaSearchRankingProfile ranking;
public int globalContributions; public int globalContributions;
public int localContributions; public int localContributions;
public int filteredResults;
public plasmaSearchResult(plasmaSearchQuery query, plasmaSearchRankingProfile ranking) { public plasmaSearchResult(plasmaSearchQuery query, plasmaSearchRankingProfile ranking) {
this.pageAcc = new TreeMap(); this.pageAcc = new TreeMap();
@ -76,6 +77,7 @@ public final class plasmaSearchResult {
this.ranking = ranking; this.ranking = ranking;
this.globalContributions = 0; this.globalContributions = 0;
this.localContributions = 0; this.localContributions = 0;
this.filteredResults = 0;
} }
public plasmaSearchResult cloneSmart() { public plasmaSearchResult cloneSmart() {

@ -2079,13 +2079,17 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
// result is a List of urlEntry elements: prepare answer // result is a List of urlEntry elements: prepare answer
if (acc == null) { if (acc == null) {
prop.put("type_totalcount", "0"); prop.put("num-results_totalcount", 0);
prop.put("type_orderedcount", "0"); prop.put("num-results_filteredcount", 0);
prop.put("type_linkcount", "0"); prop.put("num-results_orderedcount", 0);
prop.put("num-results_linkcount", 0);
prop.put("references", 0);
prop.put("type_results", 0);
} else { } else {
prop.put("type_totalcount", acc.globalContributions + acc.localContributions); prop.put("num-results_totalcount", acc.globalContributions + acc.localContributions);
prop.put("type_orderedcount", Integer.toString(acc.sizeOrdered())); prop.put("num-results_filteredcount", acc.filteredResults);
prop.put("type_globalresults", acc.globalContributions); prop.put("num-results_orderedcount", Integer.toString(acc.sizeOrdered()));
prop.put("num-results_globalresults", acc.globalContributions);
int i = 0; int i = 0;
int p; int p;
indexURLEntry urlentry; indexURLEntry urlentry;
@ -2199,16 +2203,17 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
for (int ii = 0; ii < ws.length; ii++) System.out.print(ws[ii] + ", "); for (int ii = 0; ii < ws.length; ii++) System.out.print(ws[ii] + ", ");
System.out.println(" all words = " + ref.getElementCount() + ", total count = " + ref.getTotalCount()); System.out.println(" all words = " + ref.getElementCount() + ", total count = " + ref.getTotalCount());
*/ */
prop.put("type_references", ws); prop.put("references", ws);
prop.put("type_linkcount", Integer.toString(i)); prop.put("num-results_linkcount", Integer.toString(i));
prop.put("type_results", Integer.toString(i)); prop.put("type_results", Integer.toString(i));
} }
// log // log
log.logInfo("EXIT WORD SEARCH: " + query.queryWords + " - " + log.logInfo("EXIT WORD SEARCH: " + query.queryWords + " - " +
prop.get("type_totalcount", "0") + " links found, " + prop.get("num-results_totalcount", "0") + " links found, " +
prop.get("type_orderedcount", "0") + " links ordered, " + prop.get("num-results_filteredcount", "0") + " links filtered, " +
prop.get("type_linkcount", "?") + " links selected, " + prop.get("num-results_orderedcount", "0") + " links ordered, " +
prop.get("num-results_linkcount", "?") + " links selected, " +
((System.currentTimeMillis() - timestamp) / 1000) + " seconds"); ((System.currentTimeMillis() - timestamp) / 1000) + " seconds");
return prop; return prop;
} catch (IOException e) { } catch (IOException e) {

Loading…
Cancel
Save