protected virtual IndexSettingsDescriptor ConfigureIndexSettings(IndexSettingsDescriptor settings, string documentType) { // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#mapping-limit-settings var fieldsLimit = GetFieldsLimit(); return(settings .Setting("index.mapping.total_fields.limit", fieldsLimit) .Analysis(a => a .TokenFilters(tokenFilters => ConfigureTokenFilters(tokenFilters, documentType)) .Analyzers(analyzers => ConfigureAnalyzers(analyzers, documentType)))); }
private IPromise <IIndexSettings> CreateSettings(IndexSettingsDescriptor settingsDescriptor) { return(settingsDescriptor .Setting("max_ngram_diff", 7) .Analysis(CreateAnalysis)); }
private static IPromise <IIndexSettings> SetupSetting(IndexSettingsDescriptor indexSettings) { return(indexSettings .Setting("max_ngram_diff", 7) .Analysis(SetupAnalysis)); }