public Index CreateIndexFrom(Type type, string name) { var index = new Index(name, _fieldFactory.CreateFieldCollection(type).ToArray()); foreach (var suggesterInfo in GetSuggesters(type)) { index.Suggesters.Add(new Suggester(suggesterInfo.Key, SuggesterSearchMode.AnalyzingInfixMatching, suggesterInfo.Value)); } return(index); }
private IEnumerable <string> GetFacetableFieldNamesFromType(Type type) { return(from field in _fieldFactory.CreateFieldCollection(type) where field.IsFacetable select field.Name); }