suggester.go 490 B

123456789101112131415
  1. // Copyright 2012-present Oliver Eilhard. All rights reserved.
  2. // Use of this source code is governed by a MIT-license.
  3. // See http://olivere.mit-license.org/license.txt for details.
  4. package elastic
  5. // Represents the generic suggester interface.
  6. // A suggester's only purpose is to return the
  7. // source of the query as a JSON-serializable
  8. // object. Returning a map[string]interface{}
  9. // will do.
  10. type Suggester interface {
  11. Name() string
  12. Source(includeName bool) (interface{}, error)
  13. }