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

Fix: Inverted string search test in some combinations. #14

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions src/FhirStore.CommonVersioned/Search/EvalStringSearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static bool TestStringStartsWith(ITypedElement valueNode, ParsedSearchPar
continue;
}

if (sp.Values[i].StartsWith(value, StringComparison.OrdinalIgnoreCase))
if (value.StartsWith(sp.Values[i], StringComparison.OrdinalIgnoreCase))
{
return true;
}
Expand Down Expand Up @@ -63,7 +63,7 @@ public static bool TestStringContains(ITypedElement valueNode, ParsedSearchParam
continue;
}

if (sp.Values[i].Contains(value, StringComparison.OrdinalIgnoreCase))
if (value.Contains(sp.Values[i], StringComparison.OrdinalIgnoreCase))
{
return true;
}
Expand Down Expand Up @@ -92,7 +92,7 @@ public static bool TestStringExact(ITypedElement valueNode, ParsedSearchParamete
continue;
}

if (sp.Values[i].Equals(value, StringComparison.Ordinal))
if (value.Equals(sp.Values[i], StringComparison.Ordinal))
{
return true;
}
Expand Down