mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
This commit is contained in:
parent
b76836db7b
commit
cba4ab862e
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user