Skip to content

Commit

Permalink
search result showPicture update search parameter
Browse files Browse the repository at this point in the history
used parameter &cat=image is obsolete and returns no results
- remove &cat=image and &cat=href references
- remove &tenant= references (unused)
Use contentdom=image and inurl: parameter to make showPicture link display something (open in new window because of used inurl modifier changes original query)
  • Loading branch information
reger committed Sep 30, 2014
1 parent 3073c69 commit 7c17078
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
2 changes: 0 additions & 2 deletions htroot/index.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public static serverObjects respond(final RequestHeader header, final serverObje
final int maximumRecords = sb.getConfigInt(SwitchboardConstants.SEARCH_ITEMS, 10);
final String prefermaskfilter = (post == null) ? "" : post.get("prefermaskfilter", "");
final String constraint = (post == null) ? "" : post.get("constraint", "");
final String cat = (post == null) ? "href" : post.get("cat", "href");
final int type = (post == null) ? 0 : post.getInt("type", 0);

//final boolean indexDistributeGranted = sb.getConfigBool(SwitchboardConstants.INDEX_DIST_ALLOW, true);
Expand Down Expand Up @@ -118,7 +117,6 @@ public static serverObjects respond(final RequestHeader header, final serverObje
prop.putHTML("searchoptions_prefermaskoptions_prefermaskfilter", prefermaskfilter);
prop.put("searchoptions_indexofChecked", "");
prop.put("results", "");
prop.putHTML("cat", cat);
prop.put("type", type);
prop.put("depth", "0");
prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0);
Expand Down
1 change: 0 additions & 1 deletion htroot/yacysearch.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
<input type="hidden" name="nav" value="#[search.navigation]#" />
<input type="hidden" name="prefermaskfilter" value="#[prefermaskfilter]#" />
<input type="hidden" name="depth" value="#[depth]#" />
<input type="hidden" name="cat" value="#[cat]#" />
<input type="hidden" name="constraint" value="#[constraint]#" />
<input type="hidden" name="meanCount" value="#[meanCount]#" />
</form>
Expand Down
5 changes: 1 addition & 4 deletions htroot/yacysearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,8 @@ public static serverObjects respond(
prop.put("resource", "global");
prop.put("urlmaskfilter", (post == null) ? ".*" : post.get("urlmaskfilter", ".*"));
prop.put("prefermaskfilter", (post == null) ? "" : post.get("prefermaskfilter", ""));
prop.put("tenant", (post == null) ? "" : post.get("tenant", ""));
prop.put("indexof", "off");
prop.put("constraint", "");
prop.put("cat", "href");
prop.put("depth", "0");
prop.put(
"search.verify",
Expand Down Expand Up @@ -348,7 +346,7 @@ public static serverObjects respond(
}
}

if ( !block && (post == null || post.get("cat", "href").equals("href")) ) {
if ( !block ) {
String urlmask = null;
String tld = null;
String inlink = null;
Expand Down Expand Up @@ -858,7 +856,6 @@ public static serverObjects respond(
prop.put("num-results", "3");
}

prop.put("cat", "href");
prop.put("depth", "0");

}
Expand Down
2 changes: 1 addition & 1 deletion htroot/yacysearchitem.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h4 class="linktitle">
#(showMetadata)#::&nbsp;|&nbsp;<a href="solr/select?q=id:%22#[urlhash]#%22&defType=edismax&start=0&rows=1&core=collection1&wt=html" target="_blank" onclick="return hs.htmlExpand(this, { objectType: 'ajax'} )">Metadata</a>#(/showMetadata)#
#(showParser)#::&nbsp;|&nbsp;<a href="ViewFile.html?urlHash=#[urlhash]#&amp;words=#[words]#" target="_blank">Parser</a>#(/showParser)#
#(showCitation)#::&nbsp;|&nbsp;<a href="api/citation.html?hash=#[urlhash]#" target="_blank">Citations</a>#(/showCitation)#
#(showPictures)#::&nbsp;|&nbsp;<a href="yacysearch.html?cat=image&amp;url=#[link]#&amp;query=#[former]#">Pictures</a>#(/showPictures)#
#(showPictures)#::&nbsp;|&nbsp;<a href="yacysearch.html?contentdom=image&amp;url=#[link]#&amp;query=#[former]# inurl:#[link]#" target="_blank">Pictures</a>#(/showPictures)#
#(showCache)#::&nbsp;|&nbsp;<a href="CacheResource_p.html?url=#[link]#" target="_blank">Cache</a>#(/showCache)#
#(showProxy)#::&nbsp;|&nbsp;<a href="proxy.html?url=#[link]#" target="_blank">Augmented Browsing</a>#(/showProxy)#
#(showHostBrowser)#::&nbsp;|&nbsp;<a href="HostBrowser.html?path=#[link]#"><img src="env/grafics/minitree.png" width="15" height="8"/></a>#(/showHostBrowser)#
Expand Down
4 changes: 2 additions & 2 deletions htroot/yacysearchtrailer.java
Original file line number Diff line number Diff line change
Expand Up @@ -525,5 +525,5 @@ private static final boolean on(final int pos, final int neg, final int maxlimit
}

}
//http://localhost:8090/yacysearch.html?query=java+&amp;maximumRecords=10&amp;resource=local&amp;verify=cacheonly&amp;nav=hosts,authors,namespace,topics,filetype,protocol&amp;urlmaskfilter=ftp://.*&amp;prefermaskfilter=&amp;cat=href&amp;constraint=&amp;contentdom=text&amp;former=java+%2Fftp&amp;startRecord=0
//http://localhost:8090/yacysearch.html?query=java+&amp;maximumRecords=10&amp;resource=local&amp;verify=cacheonly&amp;nav=hosts,authors,namespace,topics,filetype,protocol&amp;urlmaskfilter=.*&amp;prefermaskfilter=&amp;cat=href&amp;constraint=&amp;contentdom=text&amp;former=java+%2Fvocabulary%2FGewerke%2FTore&amp;startRecord=0
//http://localhost:8090/yacysearch.html?query=java+&amp;maximumRecords=10&amp;resource=local&amp;verify=cacheonly&amp;nav=hosts,authors,namespace,topics,filetype,protocol&amp;urlmaskfilter=ftp://.*&amp;prefermaskfilter=&amp;constraint=&amp;contentdom=text&amp;former=java+%2Fftp&amp;startRecord=0
//http://localhost:8090/yacysearch.html?query=java+&amp;maximumRecords=10&amp;resource=local&amp;verify=cacheonly&amp;nav=hosts,authors,namespace,topics,filetype,protocol&amp;urlmaskfilter=.*&amp;prefermaskfilter=&amp;constraint=&amp;contentdom=text&amp;former=java+%2Fvocabulary%2FGewerke%2FTore&amp;startRecord=0

0 comments on commit 7c17078

Please sign in to comment.