Documentation ¶
Index ¶
- Constants
- func AliasUpdate(index, alias string, elasticClient *elastic.Client) error
- func ClientFactory(URL, user, password string) (*elastic.Client, error)
- func CreateIndexMapping(index string, mapping string, elasticClient *elastic.Client) error
- func Flush(index string, elasticClient *elastic.Client) error
- func NewBoolQuery(queryType string) *elastic.BoolQuery
- type Retrier
Constants ¶
View Source
const ( PubliccodeMapping = `` /* 9715-byte string literal not displayed */ AdministrationsMapping = `` /* 810-byte string literal not displayed */ IPAMapping = `` /* 1879-byte string literal not displayed */ )
PubliccodeMapping is the Elasticsearch mapping for the publiccode index. AdministrationsMapping is the Elasticsearch mapping for the administrations index.
Variables ¶
This section is empty.
Functions ¶
func AliasUpdate ¶
AliasUpdate update the Alias to the index.
func ClientFactory ¶
ClientFactory returns an elastic Client.
func CreateIndexMapping ¶
CreateIndexMapping adds (if not exists) the mapping for the crawler data in ES.
func NewBoolQuery ¶
NewBoolQuery initializes a boolean query for Elasticsearch.
Types ¶
type Retrier ¶
type Retrier struct {
// contains filtered or unexported fields
}
Retrier implements the elastic interface that user can implement to intercept failed requests.
func NewESRetrier ¶
func NewESRetrier() *Retrier
NewESRetrier returns a new Retrier with Exponential Backoff waiting.
Click to show internal directories.
Click to hide internal directories.