Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 private IEnumerable <string> GetFacetableFieldNamesFromType(Type type)
 {
     return(from field in _fieldFactory.CreateFieldCollection(type)
            where field.IsFacetable
            select field.Name);
 }