mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 09:02:53 +00:00
Delete non-existing documents from the index
This commit is contained in:
@@ -16,6 +16,12 @@ const (
|
||||
AggregationKeyword = "aggs"
|
||||
)
|
||||
|
||||
type Mode int
|
||||
const (
|
||||
InsertOrUpdate = iota
|
||||
Delete
|
||||
)
|
||||
|
||||
// Redefinition of Hits structure. Must match the json string of
|
||||
// KustomizeResult.Hits.Hits. Declared as a convenience for iteration.
|
||||
type KustomizeHits []struct {
|
||||
@@ -301,6 +307,11 @@ func (ki *KustomizeIndex) Put(id string, doc *doc.KustomizationDocument) (string
|
||||
return id, nil
|
||||
}
|
||||
|
||||
// Delete a document with a given id from the kustomize index.
|
||||
func (ki *KustomizeIndex) Delete(id string) error {
|
||||
return ki.index.Delete(id)
|
||||
}
|
||||
|
||||
// Kustomize search options: What metrics should be returned? Kind Aggregation,
|
||||
// TimeseriesAggregation, etc. Also embedds the SearchOptions field to specify
|
||||
// the position in the sorted list of results and the number of results to return.
|
||||
|
||||
Reference in New Issue
Block a user