diff --git a/osu.Game.Tests/NonVisual/Filtering/FilterQueryParserTest.cs b/osu.Game.Tests/NonVisual/Filtering/FilterQueryParserTest.cs index 7e7f7c95fe..ade8146774 100644 --- a/osu.Game.Tests/NonVisual/Filtering/FilterQueryParserTest.cs +++ b/osu.Game.Tests/NonVisual/Filtering/FilterQueryParserTest.cs @@ -39,13 +39,13 @@ namespace osu.Game.Tests.NonVisual.Filtering Assert.That(filterCriteria.SearchTerms[1].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.IsolatedPhrase)); Assert.That(filterCriteria.SearchTerms[2].SearchTerm, Is.EqualTo("looking")); - Assert.That(filterCriteria.SearchTerms[2].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.None)); + Assert.That(filterCriteria.SearchTerms[2].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.Substring)); Assert.That(filterCriteria.SearchTerms[3].SearchTerm, Is.EqualTo("for")); - Assert.That(filterCriteria.SearchTerms[3].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.None)); + Assert.That(filterCriteria.SearchTerms[3].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.Substring)); Assert.That(filterCriteria.SearchTerms[4].SearchTerm, Is.EqualTo("like")); - Assert.That(filterCriteria.SearchTerms[4].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.None)); + Assert.That(filterCriteria.SearchTerms[4].MatchMode, Is.EqualTo(FilterCriteria.MatchMode.Substring)); } /* @@ -272,7 +272,7 @@ namespace osu.Game.Tests.NonVisual.Filtering Assert.AreEqual("find me songs by please", filterCriteria.SearchText.Trim()); Assert.AreEqual(5, filterCriteria.SearchTerms.Length); Assert.AreEqual("singer", filterCriteria.Artist.SearchTerm); - Assert.That(filterCriteria.Artist.MatchMode, Is.EqualTo(FilterCriteria.MatchMode.None)); + Assert.That(filterCriteria.Artist.MatchMode, Is.EqualTo(FilterCriteria.MatchMode.Substring)); } [Test] diff --git a/osu.Game/Screens/Select/FilterCriteria.cs b/osu.Game/Screens/Select/FilterCriteria.cs index 6ac6b7d5fe..36e048fd3d 100644 --- a/osu.Game/Screens/Select/FilterCriteria.cs +++ b/osu.Game/Screens/Select/FilterCriteria.cs @@ -154,7 +154,7 @@ namespace osu.Game.Screens.Select switch (MatchMode) { default: - case MatchMode.None: + case MatchMode.Substring: return value.Contains(SearchTerm, StringComparison.InvariantCultureIgnoreCase); case MatchMode.IsolatedPhrase: @@ -185,7 +185,7 @@ namespace osu.Game.Screens.Select MatchMode = MatchMode.IsolatedPhrase; } else - MatchMode = MatchMode.None; + MatchMode = MatchMode.Substring; } } @@ -197,7 +197,7 @@ namespace osu.Game.Screens.Select /// /// Match using a simple "contains" substring match. /// - None, + Substring, /// /// Match for the search phrase being isolated by spaces, or at the start or end of the text.