all repos — searchix @ 0de558cbda214106f46d26ace622df5dbb3266fd

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: interface{}->any
Alan Pearce alan@alanpearce.eu
Fri, 07 Mar 2025 14:35:32 +0100
commit

0de558cbda214106f46d26ace622df5dbb3266fd

parent

fa6266bda5bbb573d1d2e85b71968a3905c5e92d

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M internal/index/indexer.gointernal/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,
 		}