Skip to content

Commit

Permalink
Adding back exported Analyze(..) APIs for scorch & upsidedown
Browse files Browse the repository at this point in the history
Note that these APIs have different signatures for the two.
  • Loading branch information
abhinavdangeti committed Jan 13, 2021
1 parent 89234a6 commit 864195c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index/scorch/scorch.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,10 @@ func (s *Scorch) StatsMap() map[string]interface{} {
return m
}

func (s *Scorch) Analyze(d index.Document) {
analyze(d)
}

func analyze(d index.Document) {
d.VisitFields(func(field index.Field) {
if field.Options().IsIndexed() {
Expand Down
4 changes: 4 additions & 0 deletions index/upsidedown/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ type AnalysisResult struct {
Rows []IndexRow
}

func (udc *UpsideDownCouch) Analyze(d index.Document) *AnalysisResult {
return udc.analyze(d)
}

func (udc *UpsideDownCouch) analyze(d index.Document) *AnalysisResult {
rv := &AnalysisResult{
DocID: d.ID(),
Expand Down

0 comments on commit 864195c

Please sign in to comment.