rode / grafeas-elasticsearch

An implementation of the Grafeas storage backend based on Elasticsearch
Apache License 2.0
12 stars 5 forks source link

[esutil.Client] support working with indices that use join fields #82

Closed mrparkers closed 3 years ago

mrparkers commented 3 years ago

two significant changes here:

1) BulkCreate has been renamed to Bulk, so it can be used for indexing, creating, updating, and deleting. a new type was added for the BulkRequestItem so you can specify what each operation is. 2) Added a EsJoin type that can be used within Create and Bulk. this type has a custom JSON marshaller that allows you to specify join fields as a part of the document source without having to modify the original proto message.

more info on the join field here: https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html

no unit tests yet

codecov-commenter commented 3 years ago

Codecov Report

Merging #82 (e279941) into main (1df2c81) will decrease coverage by 0.30%. The diff coverage is 81.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
- Coverage   84.59%   84.28%   -0.31%     
==========================================
  Files           8        9       +1     
  Lines         954      999      +45     
==========================================
+ Hits          807      842      +35     
- Misses         88       93       +5     
- Partials       59       64       +5     
Impacted Files Coverage Δ
go/v1beta1/storage/filtering/filtering.go 73.87% <ø> (ø)
go/v1beta1/storage/esutil/types.go 69.23% <69.23%> (ø)
go/v1beta1/storage/esutil/client.go 81.60% <76.74%> (-0.21%) :arrow_down:
go/v1beta1/storage/elasticsearch.go 94.54% <100.00%> (+0.02%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1df2c81...e279941. Read the comment docs.