Skip to content

Commit

Permalink
fixes and closes #1347
Browse files Browse the repository at this point in the history
removing the escaping for ID matching
  • Loading branch information
djtfmartin committed Aug 13, 2024
1 parent 9b06359 commit b2ee90c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ private static String escapeQueryChars(String s) {
}

private Optional<Document> getByUsageKey(String usageKey) {
Query query = new TermQuery(new Term(FIELD_ID, escapeQueryChars(usageKey)));
Query query = new TermQuery(new Term(FIELD_ID, usageKey));
try {
TopDocs docs = getSearcher().search(query, 3);
if (docs.totalHits.value > 0) {
Expand Down Expand Up @@ -600,6 +600,11 @@ private static ExternalID toExternalID(Document doc, Dataset dataset) {
*/
public NameUsageMatch matchByExternalKey(String key, Issue notFoundIssue, Issue ignoredIssue) {

NameUsageMatch usageMatch = matchByUsageKey(key);
if (usageMatch.getDiagnostics().getMatchType() != MatchType.NONE) {
return usageMatch;
}

// if join indexes are present, add them to the match
if (identifierSearchers != null && !identifierSearchers.isEmpty()){
try {
Expand Down

0 comments on commit b2ee90c

Please sign in to comment.