0
0
Fork 0

index: document DumpAll, DumpDoc and DumpFields methods

This commit is contained in:
Patrick Mezard 2015-11-03 18:11:02 +01:00
parent a873c76edc
commit 97529b1925
1 changed files with 16 additions and 0 deletions

View File

@ -174,8 +174,24 @@ type Index interface {
FieldDictRange(field string, startTerm []byte, endTerm []byte) (index.FieldDict, error)
FieldDictPrefix(field string, termPrefix []byte) (index.FieldDict, error)
// DumpAll returns a channel receiving all index rows as
// UpsideDownCouchRow, in lexicographic byte order. If the enumeration
// fails, an error is sent. The channel is closed once the enumeration
// completes or an error is encountered. A read transaction is maintained
// for the duration of the enumeration, preventing concurrent write
// operations to proceed. The caller must consume all channel entries until
// the channel is closed to ensure the transaction and other resources
// associated with the enumeration are released.
//
// DumpAll exists for debugging and tooling purpose and may change in the
// future.
DumpAll() chan interface{}
// DumpDoc works like DumpAll but returns only StoredRows and
// TermFrequencyRows related to a document.
DumpDoc(id string) chan interface{}
// DumpFields works like DumpAll but returns only FieldRows.
DumpFields() chan interface{}
Close() error