add some godocs for the API pagination tokenizer options (#12547)

This commit is contained in:
Luiz Aoqui
2022-04-12 10:27:22 -04:00
committed by GitHub
parent 247e20e10b
commit 8dec033bd6

View File

@@ -31,6 +31,29 @@ type CreateIndexGetter interface {
}
// StructsTokenizerOptions is the configuration provided to a StructsTokenizer.
//
// These are some of the common use cases:
// - Structs that can be uniquely identified with only its own ID:
//
// StructsTokenizerOptions {
// WithID: true,
// }
//
// - Structs that are only unique within their namespace:
//
// StructsTokenizerOptions {
// WithID: true,
// WithNamespace: true,
// }
//
// - Structs that can be sorted by their create index should also set
// `WithCreateIndex` to `true` along with the other options:
//
// StructsTokenizerOptions {
// WithID: true,
// WithNamespace: true,
// WithCreateIndex: true,
// }
type StructsTokenizerOptions struct {
WithCreateIndex bool
WithNamespace bool