prop.putHTML("content_size",Integer.toString(result.filesize()));// we don't use putNUM here because that number shall be usable as sorting key. To print the size, use 'sizename'
prop.putHTML("content_size",Integer.toString(result.filesize()));// we don't use putNUM here because that number shall be usable as sorting key. To print the size, use 'sizename'
@ -248,9 +248,9 @@ public class yacysearchitem {
prop.putXML("content_file",resultFileName);// putXML for rss
prop.putXML("content_file",resultFileName);// putXML for rss
prop.putXML("content_path",resultURL.getPath());// putXML for rss
prop.putXML("content_path",resultURL.getPath());// putXML for rss
if(imageSpareGood.size()>0)returnnextSpare();// first put out all good spare, but no bad spare
if(imageSpareGood.size()>0)returnnextSpare();// first put out all good spare, but no bad spare
ResultEntryms=oneResult(imagePageCounter++,timeout);// we must use a different counter here because the image counter can be higher when one page filled up several spare
ResultEntrydoc=oneResult(imagePageCounter++,timeout);// we must use a different counter here because the image counter can be higher when one page filled up several spare
// check if the match was made in the url or in the image links
// check if the match was made in the url or in the image links
// boolean fakeImageHost = ms.url().getHost() != null && ms.url().getHost().indexOf("wikipedia") > 0; // pages with image extension from wikipedia do not contain image files but html files... I know this is a bad hack, but many results come from wikipedia and we must handle that
// boolean fakeImageHost = ms.url().getHost() != null && ms.url().getHost().indexOf("wikipedia") > 0; // pages with image extension from wikipedia do not contain image files but html files... I know this is a bad hack, but many results come from wikipedia and we must handle that
// generalize above hack (regarding url with file extension but beeing a html (with html mime)
// generalize above hack (regarding url with file extension but beeing a html (with html mime)
chardocType=Response.docType(mime);// first look at mime (as some html pages have img extension (like wikipedia)
if(doc.doctype()==Response.DT_IMAGE){
if(docType==Response.DT_UNKNOWN)docType=Response.docType(ms.url());// try extension if mime wasn't successful
@ -63,8 +56,8 @@ public class ResultEntry implements Comparable<ResultEntry>, Comparator<ResultEn
finalSegmentindexSegment,
finalSegmentindexSegment,
SeedDBpeers,
SeedDBpeers,
finalTextSnippettextSnippet){
finalTextSnippettextSnippet){
this.urlentry=urlentry;
super(urlentry);
this.urlentry.setField(CollectionSchema.text_t.getSolrFieldName(),"");// clear the text field which eats up most of the space; it was used for snippet computation which is in a separate field here
this.removeFields(CollectionSchema.text_t.getSolrFieldName());// clear the text field which eats up most of the space; it was used for snippet computation which is in a separate field here
this.indexSegment=indexSegment;
this.indexSegment=indexSegment;
this.alternative_urlstring=null;
this.alternative_urlstring=null;
this.alternative_urlname=null;
this.alternative_urlname=null;
@ -102,7 +95,7 @@ public class ResultEntry implements Comparable<ResultEntry>, Comparator<ResultEn