refactor: interface{}->any
Alan Pearce alan@alanpearce.eu
Fri, 07 Mar 2025 14:35:32 +0100
1 files changed, 4 insertions(+), 4 deletions(-)
jump to
M internal/index/indexer.go → internal/index/indexer.go
@@ -58,7 +58,7 @@ descriptionFieldMapping.Store = false descriptionFieldMapping.Analyzer = web.Name var err error - err = indexMapping.AddCustomAnalyzer("loc", map[string]interface{}{ + err = indexMapping.AddCustomAnalyzer("loc", map[string]any{ "type": keyword.Name, "tokenizer": letter.Name, "token_filters": []string{ @@ -69,7 +69,7 @@ }) if err != nil { return nil, errors.WithMessage(err, "could not add custom analyser") } - err = indexMapping.AddCustomAnalyzer("keyword_single", map[string]interface{}{ + err = indexMapping.AddCustomAnalyzer("keyword_single", map[string]any{ "type": keyword.Name, "tokenizer": letter.Name, }) @@ -129,9 +129,9 @@ indexMapping, err := createIndexMapping() if err != nil { return nil, err } - kvconfig := make(map[string]interface{}) + kvconfig := make(map[string]any) if options.LowMemory { - kvconfig = map[string]interface{}{ + kvconfig = map[string]any{ "PersisterNapTimeMSec": 1000, "PersisterNapUnderNumFiles": 500, }