Skip to content

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

javadoc of new multiple-exist test

Michael Peter Christen2b563debbf8b
diff --git a/source/net/yacy/search/index/Fulltext.java b/source/net/yacy/search/index/Fulltext.java
index b05512095..54c5d8694 100644
--- a/source/net/yacy/search/index/Fulltext.java
+++ b/source/net/yacy/search/index/Fulltext.java
@@ -711,6 +711,12 @@ public final class Fulltext {
return false;
}
+ /**
+ * Multiple-test for existing url hashes in the search index.
+ * All given ids are tested and a subset of the given ids are returned.
+ * @param ids
+ * @return a set of ids which exist in the database
+ */
public Set<String> exists(Collection<String> ids) {
HashSet<String> e = new HashSet<String>();
if (ids == null || ids.size() == 0) return e;
diff --git a/source/net/yacy/search/index/Segment.java b/source/net/yacy/search/index/Segment.java
index bd10a7ab1..d32b2e6e1 100644
--- a/source/net/yacy/search/index/Segment.java
+++ b/source/net/yacy/search/index/Segment.java
@@ -302,6 +302,12 @@ public class Segment {
return this.fulltext.exists(urlhash);
}
+ /**
+ * Multiple-test for existing url hashes in the search index.
+ * All given ids are tested and a subset of the given ids are returned.
+ * @param ids
+ * @return a set of ids which exist in the database
+ */
public Set<String> exists(final Collection<String> ids) {
return this.fulltext.exists(ids);
}