public void GivenUsingSubstringIndexStrategy() { var searcher = ScenarioContext.Current.Get <Searcher>(); var uidField = ScenarioContext.Current.Get <string>("uidField"); var newSearcher = new Searcher(uidField).WithIndexStrategy(new AllSubstringsIndexStrategy());; newSearcher.SetDocuments(searcher.Documents); newSearcher.AddIndex(searcher.SearchableFields.ToArray()); ScenarioContext.Current.Set(newSearcher); }