re-order ImportRoaringBytes args to be more consistent

This commit is contained in:
Matt Jaffee 2018-09-13 10:39:00 -05:00
parent c6817340c7
commit f006df7758
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF
2 changed files with 2 additions and 2 deletions

2
api.go
View file

@ -312,7 +312,7 @@ func (api *API) Field(_ context.Context, indexName, fieldName string) (*Field, e
// (shard*ShardWidth)+(i%ShardWidth). That is to say that roaringBytes
// represents all of the rows in this shard of this field concatenated together
// in one long bitmap.
func (api *API) ImportRoaringBytes(ctx context.Context, roaringBytes []byte, indexName, fieldName string, shard uint64) (err error) {
func (api *API) ImportRoaringBytes(ctx context.Context, indexName, fieldName string, shard uint64, roaringBytes []byte) (err error) {
if err = api.validate(apiField); err != nil {
return errors.Wrap(err, "validating api method")
}

View file

@ -1458,7 +1458,7 @@ func (h *Handler) handlePostRoaringImport(w http.ResponseWriter, r *http.Request
return
}
//TODO give meaningful stats for import
err = h.api.ImportRoaringBytes(r.Context(), body, indexName, fieldName, shard)
err = h.api.ImportRoaringBytes(r.Context(), indexName, fieldName, shard, body)
// Marshal response object.
msg := string("")