Skip to content

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

fix for http://bugs.yacy.net/view.php?id=202

Michael Peter Christencba4ab862e81
diff --git a/htroot/ViewFile.java b/htroot/ViewFile.java
index 712aecb5f..96bc551af 100644
--- a/htroot/ViewFile.java
+++ b/htroot/ViewFile.java
@@ -114,6 +114,8 @@ public class ViewFile {
String urlHash = post.get("urlHash", "");
URIMetadata urlEntry = null;
// get the urlEntry that belongs to the url hash
+ //boolean ue = urlHash.length() > 0 && indexSegment.exists(ASCII.getBytes(urlHash));
+ //if (ue) Log.logInfo("ViewFile", "exists(" + urlHash + ")");
if (urlHash.length() > 0 && (urlEntry = indexSegment.urlMetadata().load(ASCII.getBytes(urlHash))) != null) {
// get the url that belongs to the entry
if (urlEntry == null || urlEntry.url() == null) {
diff --git a/source/net/yacy/cora/services/federated/solr/AbstractSolrConnector.java b/source/net/yacy/cora/services/federated/solr/AbstractSolrConnector.java
index f0b040258..7bafdb5f6 100644
--- a/source/net/yacy/cora/services/federated/solr/AbstractSolrConnector.java
+++ b/source/net/yacy/cora/services/federated/solr/AbstractSolrConnector.java
@@ -221,8 +221,8 @@ public class AbstractSolrConnector implements SolrConnector {
@Override
public SolrDocument get(final String id) throws IOException {
// construct query
- StringBuffer sb = new StringBuffer(id.length() + 3);
- sb.append(SolrField.id.getSolrFieldName()).append(':').append(id);
+ StringBuffer sb = new StringBuffer(id.length() + 5);
+ sb.append(SolrField.id.getSolrFieldName()).append(':').append('"').append(id).append('"');
final SolrQuery query = new SolrQuery();
query.setQuery(sb.toString());
query.setRows(1);
@@ -235,6 +235,7 @@ public class AbstractSolrConnector implements SolrConnector {
if (docs.isEmpty()) return null;
return docs.get(0);
} catch (final Throwable e) {
+ Log.logWarning("AbstractSolrConnection", "problem with id=" + id, e);
throw new IOException(e);
}
}