/// <summary> /// Register a field to be sorted /// </summary> protected void Suggestion(Expression <Func <TReduceResult, object> > field, SuggestionOptions suggestion = null) { IndexSuggestions.Add(field, suggestion ?? new SuggestionOptions { Accuracy = 0.5f, Distance = StringDistanceTypes.Levenshtein }); }
public Users_ByName() { Map = users => from u in users select new { Name = u.Name, LastName = u.LastName.Boost(10) }; Indexes.Add(x => x.Name, FieldIndexing.Analyzed); IndexSuggestions.Add(x => x.Name, new SuggestionOptions()); }
public Users_ByName() { Map = users => from u in users select new { Name = u.Name }; Indexes.Add(x => x.Name, FieldIndexing.Analyzed); IndexSuggestions.Add(x => x.Name, new SuggestionOptions()); Stores.Add(x => x.Name, FieldStorage.Yes); }
public Users_ByName() { Map = users => from u in users select new { Name = u.Name, LastName = u.LastName.Boost(10) }; Indexes.Add(x => x.Name, FieldIndexing.Analyzed); IndexSuggestions.Add(x => x.Name, new SuggestionOptions()); Analyzers.Add(x => x.Name, typeof(SimpleAnalyzer).FullName); Stores.Add(x => x.Name, FieldStorage.Yes); }
public Users_ByName() { Map = users => from u in users select new { Name = u.Name, LastName = u.LastName.Boost(10) }; Indexes.Add(x => x.Name, FieldIndexing.Search); IndexSuggestions.Add(x => x.Name); Analyzers.Add(x => x.Name, typeof(Lucene.Net.Analysis.SimpleAnalyzer).FullName); Stores.Add(x => x.Name, FieldStorage.Yes); }
public Users_ByName() { Map = users => from u in users select new { Name = u.Name, LastName = u.LastName.Boost(10) }; Indexes.Add(x => x.Name, FieldIndexing.Analyzed); IndexSuggestions.Add(x => x.Name, new SuggestionOptions()); #if !DNXCORE50 Analyzers.Add(x => x.Name, typeof(SimpleAnalyzer).FullName); #else Analyzers.Add(x => x.Name, "Lucene.Net.Analysis.SimpleAnalyzer"); #endif Stores.Add(x => x.Name, FieldStorage.Yes); }
/// <summary> /// Register a field to be sorted /// </summary> protected void Suggestion(Expression <Func <TReduceResult, object> > field) { IndexSuggestions.Add(field); }