-
Notifications
You must be signed in to change notification settings - Fork 697
Open
Description
Hello,
I want to have an index, but one that stores some additional data so that when I query the index, I can fetch that data (not search on it). How can I do it?
I tried something like type Tags = map[string]string and
tagsMapping := bleve.NewKeywordFieldMapping()
tagsMapping.Analyzer = ""
tagsMapping.Index = false
tagsMapping.Store = true
docMapping.AddFieldMappingsAt("tags", tagsMapping)Apparently I can index my document with Tags, but when I try to search for it like this:
searchReq.Fields = []string{"address", "city", "geo", "tags"}
...
myDoc.Tags = hit.Fields["tags"].(map[string]string)I get an error:
interface conversion: interface {} is nil, not map[string]string
Metadata
Metadata
Assignees
Labels
No labels