mapping_index: add IndexMapping.FieldAnalyzer()
It returns the name of the analyzer used on a field, which can be passed to IndexMapping.AnalyzeText(). Fix #282
This commit is contained in:
parent
7dd52a5463
commit
ff41dfec3d
|
@ -507,3 +507,8 @@ func (im *IndexMapping) AnalyzeText(analyzerName string, text []byte) (analysis.
|
|||
}
|
||||
return analyzer.Analyze(text), nil
|
||||
}
|
||||
|
||||
// FieldAnalyzer returns the name of the analyzer used on a field.
|
||||
func (im *IndexMapping) FieldAnalyzer(field string) string {
|
||||
return im.analyzerNameForPath(field)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue