Browse Source

add method to access analyzer of a text field (#1276)

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.
tags/v0.8.1
Marty Schoch GitHub 2 months ago
parent
commit
c997533a77
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      document/field_text.go

+ 4
- 0
document/field_text.go View File

@@ -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
}

Loading…
Cancel
Save