all repos — searchix @ d2bc9be6ec207fb06418e56774f64034eee8b57f

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

fix: matching long prefixes in option names (regression) Fixes: https://codeberg.org/alanpearce/searchix/issues/1

Alan Pearce
commit

d2bc9be6ec207fb06418e56774f64034eee8b57f

parent

7514e6182832fc7806d2d45d32ea87ad3cdc668c

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

changed files
M internal/index/indexer.gointernal/index/indexer.go
@@ -137,7 +137,7 @@ locFieldMapping.Store = false
optionMapping := bleve.NewDocumentStaticMapping() - optionMapping.AddFieldMappingsAt("Name", attributeFieldMapping) + optionMapping.AddFieldMappingsAt("Name", attributeFieldMapping, locFieldMapping) optionMapping.AddFieldMappingsAt("NameNGram", nameNGramMapping) optionMapping.AddFieldMappingsAt("Source", identityFieldMapping) optionMapping.AddFieldMappingsAt("Loc", locFieldMapping)
@@ -149,7 +149,7 @@ optionMapping.AddSubDocumentMapping("Example", nixValueMapping)
packageMapping := bleve.NewDocumentStaticMapping() - packageMapping.AddFieldMappingsAt("Name", keywordFieldMapping) + packageMapping.AddFieldMappingsAt("Name", keywordFieldMapping, locFieldMapping) packageMapping.AddFieldMappingsAt("NameNGram", nameNGramMapping) packageMapping.AddFieldMappingsAt("Attribute", attributeFieldMapping) packageMapping.AddFieldMappingsAt("AttributeNGram", nameNGramMapping)