Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Commit

Permalink
reversed the logic of searchIndexExist
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrank241 committed Aug 5, 2024
1 parent 62a7913 commit 8b54630
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private boolean searchIndexExists() {
if (scopes.size() != 2 && scopes.size() != 3) {
System.out.println(
"There must be exactly 2 or 3 scopes, found: " + scopes.size());
return false;
return true;
}

boolean hasDefaultScope = false;
Expand All @@ -218,7 +218,7 @@ private boolean searchIndexExists() {
hasCustomScope = true;
} else {
System.out.println("Unexpected scope found: " + scope.name());
return false;
return true;
}
}

Expand All @@ -227,21 +227,21 @@ private boolean searchIndexExists() {
if (!hasDefaultScope || !hasSystemScope) {
System.out.println(
"When there are 2 scopes, they must be _default and _system.");
return false;
return true;
}
} else if (scopes.size() == 3) {
if (!hasDefaultScope || !hasSystemScope || !hasCustomScope) {
System.out.println(
"When there are 3 scopes, they must be _default, _system, and "
+ scopeName);
return false;
return true;
}
}

return true;
return false;
} catch (Exception e) {
e.printStackTrace();
return false;
return true;
}
}

Expand Down

0 comments on commit 8b54630

Please sign in to comment.