private static IPromise <ITokenFilters> CreateTokenFilters(TokenFiltersDescriptor tokenFiltersDescriptor)
 {
     return(tokenFiltersDescriptor
            .NGram(TokenFilters.NgramFilter, ng => ng
                   .MinGram(3)
                   .MaxGram(10)));
 }
Beispiel #2
0
 protected virtual TokenFiltersDescriptor ConfigureTokenFilters(TokenFiltersDescriptor tokenFilters, string documentType)
 {
     return(tokenFilters
            .NGram(NGramFilterName, descriptor => ConfigureNGramFilter(descriptor, documentType))
            .EdgeNGram(EdgeNGramFilterName, descriptor => ConfigureEdgeNGramFilter(descriptor, documentType))
            );
 }
 private static IPromise <ITokenFilters> SetupTokenFilter(TokenFiltersDescriptor tokenFilters)
 {
     return(tokenFilters.
            NGram(TokenFilter.NGram, s => s
                  .MinGram(3)
                  .MaxGram(10)));
 }
 public static TokenFiltersDescriptor AddNgramFilter(this TokenFiltersDescriptor fd)
 {
     return(fd.NGram(ElasticFilters.Ngram, ng => ng.MinGram(2).MaxGram(15)));
 }