/// <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
     });
 }
Esempio n. 2
0
        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());
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
 /// <summary>
 /// Register a field to be sorted
 /// </summary>
 protected void Suggestion(Expression <Func <TReduceResult, object> > field)
 {
     IndexSuggestions.Add(field);
 }