From 97529b19259c5a4bfd8cd0e4caa125d20bb3e6bc Mon Sep 17 00:00:00 2001 From: Patrick Mezard Date: Tue, 3 Nov 2015 18:11:02 +0100 Subject: [PATCH] index: document DumpAll, DumpDoc and DumpFields methods --- index.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/index.go b/index.go index f8169443..1d8afe8a 100644 --- a/index.go +++ b/index.go @@ -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