Skip to content

Commit

Permalink
add method to access analyzer of a text field (blevesearch#1276)
Browse files Browse the repository at this point in the history
this change allows applications to see the analyzer set for
a text field, useful if applications want to modify the document
after mapping, but prior to indexing.
  • Loading branch information
mschoch authored Aug 12, 2019
1 parent 25d45a1 commit c997533
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions document/field_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func (t *TextField) Analyze() (int, analysis.TokenFrequencies) {
return fieldLength, tokenFreqs
}

func (t *TextField) Analyzer() *analysis.Analyzer {
return t.analyzer
}

func (t *TextField) Value() []byte {
return t.value
}
Expand Down

0 comments on commit c997533

Please sign in to comment.