Fix search test

This commit is contained in:
Victor Shcherb 2020-06-02 20:52:02 +02:00
parent 5b8ef9160e
commit 32798d167a
2 changed files with 1 additions and 2 deletions

View file

@ -783,7 +783,7 @@ public class SearchPhrase {
} }
if (startWith > 0) { if (startWith > 0) {
sr.firstUnknownWordMatches = true; sr.firstUnknownWordMatches = true;
} else if (!sr.firstUnknownWordMatches) { } else {
sr.firstUnknownWordMatches = localeName.equals(getFirstUnknownSearchWord()) sr.firstUnknownWordMatches = localeName.equals(getFirstUnknownSearchWord())
|| getFirstUnknownNameStringMatcher().matches(localeName) || getFirstUnknownNameStringMatcher().matches(localeName)
|| getFirstUnknownNameStringMatcher().matches(otherNames); || getFirstUnknownNameStringMatcher().matches(otherNames);

View file

@ -183,7 +183,6 @@ public class SearchUICoreTest {
System.out.println(String.format("Mismatch for '%s' != '%s' (%d, %.3f, %s). Result: ", expected, System.out.println(String.format("Mismatch for '%s' != '%s' (%d, %.3f, %s). Result: ", expected,
present, result.getFoundWordCount(), result.getUnknownPhraseMatchWeight(), result.objectType.toString())); present, result.getFoundWordCount(), result.getUnknownPhraseMatchWeight(), result.objectType.toString()));
for (SearchResult r : searchResults) { for (SearchResult r : searchResults) {
// System.out.println(String.format("\t\"%s\",", r.toString()));
System.out.println(String.format("\"%s\", (%d, %.3f, %s),", r.toString(), System.out.println(String.format("\"%s\", (%d, %.3f, %s),", r.toString(),
r.getFoundWordCount(), r.getUnknownPhraseMatchWeight(), r.objectType.toString())); r.getFoundWordCount(), r.getUnknownPhraseMatchWeight(), r.objectType.toString()));
} }