all repos — searchix @ 702a8aacb9acd37cffef6b7f415deb72954a6f49

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

refactor: rename option fields to avoid sql database quoting

Alan Pearce
commit

702a8aacb9acd37cffef6b7f415deb72954a6f49

parent

495994761bc04fd9b46e65e389e8b2cda28f1020

1 file changed, 5 insertions(+), 5 deletions(-)

changed files
M internal/index/indexer.gointernal/index/indexer.go
@@ -123,9 +123,9 @@ nameNGramMapping.Analyzer = "c_name"
nameNGramMapping.IncludeTermVectors = true nameNGramMapping.Store = false - nixValueMapping := bleve.NewDocumentStaticMapping() - nixValueMapping.AddFieldMappingsAt("Text", textFieldMapping) - nixValueMapping.AddFieldMappingsAt("Markdown", textFieldMapping) + nixDocMapping := bleve.NewDocumentStaticMapping() + nixDocMapping.AddFieldMappingsAt("Text", textFieldMapping) + nixDocMapping.AddFieldMappingsAt("Markdown", textFieldMapping) locFieldMapping := bleve.NewKeywordFieldMapping() locFieldMapping.Analyzer = "loc"
@@ -145,8 +145,8 @@ optionMapping.AddFieldMappingsAt("Loc", locFieldMapping)
optionMapping.AddFieldMappingsAt("RelatedPackages", textFieldMapping) optionMapping.AddFieldMappingsAt("Description", descriptionFieldMapping) - optionMapping.AddSubDocumentMapping("Default", nixValueMapping) - optionMapping.AddSubDocumentMapping("Example", nixValueMapping) + optionMapping.AddSubDocumentMapping("Default", nixDocMapping) + optionMapping.AddSubDocumentMapping("Example", nixDocMapping) packageMapping := bleve.NewDocumentStaticMapping()