Skip to content

Commit

Permalink
add additional methods to interface
Browse files Browse the repository at this point in the history
  • Loading branch information
CascadingRadium committed Dec 10, 2024
1 parent ee71211 commit a4d83ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mapping/mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@ type IndexMapping interface {
FieldMappingForPath(path string) FieldMapping
}

// A SynonymMapping extends the IndexMapping interface to provide
// additional methods for working with synonyms.
type SynonymMapping interface {
IndexMapping

MapSynonymDocument(doc *document.Document, collection string, input []string, synonyms []string) error

SynonymSourceForPath(path string) string

SynonymSourceNamed(name string) analysis.SynonymSource

SynonymCount() int

SynonymSourceVisitor(visitor analysis.SynonymSourceVisitor) error
}

0 comments on commit a4d83ac

Please sign in to comment.