Sometimes documents contains sections of content you simply want to ignore. Let’s imagine we have the following structure:
type Person struct {
Name string
Addr Address
}
And, we’ve decided we don’t want to index or store any of the address data. We can accomplish this by using the following DocumentMapping.
addressMapping := bleve.NewDocumentDisabledMapping()
personMapping := bleve.NewDocumentMapping()
personMapping.AddSubDocumentMapping("Addr", addressMapping)