Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconciliation service #1777

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Always add pid as field in query, tweak logging (#1606)
fsteeg committed Jan 24, 2023
commit 336c1b3ac20b0b272c248ff475882883880b122d
7 changes: 4 additions & 3 deletions web/app/controllers/resources/Reconcile.java
Original file line number Diff line number Diff line change
@@ -206,8 +206,7 @@ private static String propQuery(Entry<String, JsonNode> entry) {
String field = p.get("pid").asText();
String value = preprocess(p.get("v").asText().trim());
if (!value.isEmpty()) {
segments
.add("(" + (field.equals("hbzId") ? "hbzId:" : "") + value + ")");
segments.add("(" + field + ":" + value + ")");
}
}
}
@@ -223,7 +222,9 @@ static String preprocess(String s) {

private static String clean(String in) {
String out = in.replaceAll("[!/:+\\-=<>(){}\\[\\]^]", " ");
Logger.info("Cleaned invalid query string '{}' to: '{}'", in, out);
if (!in.equals(out)) {
Logger.info("Cleaned query string '{}' to: '{}'", in, out);
}
return out;
}