refactor: rename option fields to avoid sql database quoting
1 file changed, 5 insertions(+), 5 deletions(-)
changed files
M internal/index/indexer.go → internal/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()