specified more URIMetadata as URIMetadataNode

pull/1/head
Michael Peter Christen 12 years ago
parent 43f3345c90
commit 5d16c23a1f

@ -475,7 +475,7 @@ public class IndexControlRWIs_p {
prop.put("genUrlList_lines", maxlines);
int i = 0;
DigestURI url;
URIMetadata entry;
URIMetadataNode entry;
String us;
long rn = -1;
while ( !ranked.isEmpty() && (entry = ranked.takeURL(false, 1000)) != null ) {

@ -42,6 +42,7 @@ import net.yacy.document.LibraryProvider;
import net.yacy.document.TextParser;
import net.yacy.kelondro.data.meta.DigestURI;
import net.yacy.kelondro.data.meta.URIMetadata;
import net.yacy.kelondro.data.meta.URIMetadataNode;
import net.yacy.kelondro.logging.Log;
import net.yacy.search.query.QueryParams;
import net.yacy.search.query.RWIProcess;
@ -236,7 +237,7 @@ public class DocumentIndex extends Segment {
rankedCache.start();
// search is running; retrieve results
URIMetadata row;
URIMetadataNode row;
final ArrayList<DigestURI> files = new ArrayList<DigestURI>();
while ( (row = rankedCache.takeURL(false, 1000)) != null ) {
files.add(row.url());

@ -58,7 +58,6 @@ import net.yacy.document.Condenser;
import net.yacy.document.LibraryProvider;
import net.yacy.interaction.contentcontrol.ContentControlFilterUpdateThread;
import net.yacy.kelondro.data.meta.DigestURI;
import net.yacy.kelondro.data.meta.URIMetadata;
import net.yacy.kelondro.data.meta.URIMetadataNode;
import net.yacy.kelondro.data.meta.URIMetadataRow;
import net.yacy.kelondro.data.word.Word;
@ -625,7 +624,7 @@ public final class RWIProcess extends Thread
* @param waitingtime the time this method may take for a result computation
* @return a metadata entry for a url
*/
public URIMetadata takeURL(final boolean skipDoubleDom, final long waitingtime) {
public URIMetadataNode takeURL(final boolean skipDoubleDom, final long waitingtime) {
// returns from the current RWI list the best URL entry and removes this entry from the list
final long timeout = System.currentTimeMillis() + Math.max(10, waitingtime);
int p = -1;

@ -26,7 +26,6 @@
package net.yacy.search.query;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@ -456,7 +455,7 @@ public class SnippetProcess {
public void run() {
// start fetching urls and snippets
URIMetadata page;
URIMetadataNode page;
ResultEntry resultEntry;
//final int fetchAhead = snippetMode == 0 ? 0 : 10;
final boolean nav_topics = SnippetProcess.this.query.navigators.equals("all") || SnippetProcess.this.query.navigators.indexOf("topics",0) >= 0;
@ -498,16 +497,7 @@ public class SnippetProcess {
// in case that we have an attached solr, we load also the solr document
String solrContent = null;
SolrDocument sd = null;
if (page instanceof URIMetadataNode) {
sd = ((URIMetadataNode) page).getDocument();
} else {
try {
sd = this.metadata.getSolr().get(ASCII.String(page.hash()));
} catch (IOException e) {
Log.logException(e);
}
}
SolrDocument sd = page.getDocument();
if (sd != null) {
solrContent = this.metadata.getSolrScheme().solrGetText(sd);
}
@ -556,7 +546,7 @@ public class SnippetProcess {
}
}
protected ResultEntry fetchSnippet(final URIMetadata page, final String solrText, final CacheStrategy cacheStrategy) {
protected ResultEntry fetchSnippet(final URIMetadataNode page, final String solrText, final CacheStrategy cacheStrategy) {
// Snippet Fetching can has 3 modes:
// 0 - do not fetch snippets
// 1 - fetch snippets offline only

@ -35,7 +35,7 @@ import net.yacy.cora.document.MultiProtocolURI;
import net.yacy.cora.order.Base64Order;
import net.yacy.document.Condenser;
import net.yacy.kelondro.data.meta.DigestURI;
import net.yacy.kelondro.data.meta.URIMetadata;
import net.yacy.kelondro.data.meta.URIMetadataNode;
import net.yacy.kelondro.data.word.Word;
import net.yacy.kelondro.data.word.WordReference;
import net.yacy.kelondro.data.word.WordReferenceRow;
@ -52,7 +52,7 @@ import net.yacy.search.index.Segment;
public class ResultEntry implements Comparable<ResultEntry>, Comparator<ResultEntry> {
// payload objects
private final URIMetadata urlentry;
private final URIMetadataNode urlentry;
private String alternative_urlstring;
private String alternative_urlname;
private final TextSnippet textSnippet;
@ -62,7 +62,7 @@ public class ResultEntry implements Comparable<ResultEntry>, Comparator<ResultEn
// statistic objects
public long dbRetrievalTime, snippetComputationTime, ranking;
public ResultEntry(final URIMetadata urlentry,
public ResultEntry(final URIMetadataNode urlentry,
final Segment indexSegment,
SeedDB peers,
final TextSnippet textSnippet,

@ -49,6 +49,7 @@ import net.yacy.document.WordTokenizer;
import net.yacy.document.parser.html.CharacterCoding;
import net.yacy.kelondro.data.meta.DigestURI;
import net.yacy.kelondro.data.meta.URIMetadata;
import net.yacy.kelondro.data.meta.URIMetadataNode;
import net.yacy.kelondro.data.word.Word;
import net.yacy.kelondro.util.ByteArray;
import net.yacy.kelondro.util.ByteBuffer;
@ -146,7 +147,7 @@ public class TextSnippet implements Comparable<TextSnippet>, Comparator<TextSnip
public TextSnippet(
final LoaderDispatcher loader,
final String solrText,
final URIMetadata row,
final URIMetadataNode row,
final HandleSet queryhashes,
final CacheStrategy cacheStrategy,
final boolean pre,

Loading…
Cancel
Save