Skip to content

Commit

Permalink
Revert old commented code for encoded identifier, encode double quote…
Browse files Browse the repository at this point in the history
…s instead
  • Loading branch information
doulikecookiedough committed Oct 25, 2024
1 parent be9574b commit d3e84b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/edu/ucsb/nceas/mdqengine/MDQEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,11 @@ public ArrayList<String> findDataPids(NodeReference nodeId, String identifier) t

try {
String nodeEndpoint = D1Client.getMN(nodeId).getNodeBaseServiceUrl();
// String encodedId = URLEncoder.encode(identifier, "UTF-8");
String encodedId = URLEncoder.encode(identifier, "UTF-8");
// This is necessary for metacat's solr to process the requested queryUrl
String encodedQuotes = URLEncoder.encode("\"", "UTF-8");
// String queryUrl = nodeEndpoint + "/query/solr/?q=isDocumentedBy:" + "\"" + encodedId + "\"" + "&fl=id";
String queryUrl = nodeEndpoint + "/query/solr/?q=isDocumentedBy:" + "\"" + identifier + "\"" + "&fl=id";
String queryUrl = nodeEndpoint + "/query/solr/?q=isDocumentedBy:" + encodedQuotes + encodedId + encodedQuotes + "&fl=id";
log.debug("queryURL: " + queryUrl);

URL url = new URL(queryUrl);
Expand Down

0 comments on commit d3e84b9

Please sign in to comment.