fix: matching long prefixes in option names (regression) Fixes: https://codeberg.org/alanpearce/searchix/issues/1
1 file changed, 2 insertions(+), 2 deletions(-)
changed files
M internal/index/indexer.go → internal/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)