Skip to content

Commit

Permalink
MB-61985: Support triggering Scorch events externally (#53)
Browse files Browse the repository at this point in the history
* Add an optional method for Index implementations to support, which would allow firing scorch events externally.
  • Loading branch information
CascadingRadium authored Aug 5, 2024
1 parent a428bcb commit afedbd2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ type CopyIndex interface {
CopyReader() CopyReader
}

// EventIndex is an optional interface for exposing the support for firing event
// callbacks for various events in the index.
type EventIndex interface {
// FireIndexEvent is used to fire an event callback when Index() is called,
// to notify the caller that a document has been added to the index.
FireIndexEvent()
}

type IndexReader interface {
TermFieldReader(ctx context.Context, term []byte, field string, includeFreq, includeNorm, includeTermVectors bool) (TermFieldReader, error)

Expand Down

0 comments on commit afedbd2

Please sign in to comment.