0
0

mapping should consult default mapping for analyzers

This commit is contained in:
Marty Schoch 2015-01-22 09:54:32 -05:00
parent 29b4f9623a
commit 8891a3688d

View File

@ -393,6 +393,15 @@ func (im *IndexMapping) analyzerNameForPath(path string) string {
} }
} }
} }
// now try the default mapping
pathMapping := im.DefaultMapping.documentMappingForPath(path)
if pathMapping != nil {
if len(pathMapping.Fields) > 0 {
if pathMapping.Fields[0].Analyzer != "" {
return pathMapping.Fields[0].Analyzer
}
}
}
// next we will try default analyzers for the path // next we will try default analyzers for the path
pathDecoded := decodePath(path) pathDecoded := decodePath(path)