Skip to content

Commit

Permalink
Fixing paths for some APIs (#134)
Browse files Browse the repository at this point in the history
Signed-off-by: Vacha Shah <[email protected]>
  • Loading branch information
VachaShah authored Jul 20, 2022
1 parent 3bf8578 commit abf672c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions opensearchapi/api.create.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ func (r CreateRequest) Do(ctx context.Context, transport Transport) (*Response,
path.WriteString("/")
path.WriteString(r.Index)
path.WriteString("/")
path.WriteString(r.DocumentID)
path.WriteString("/")
path.WriteString("_create")
path.WriteString("/")
path.WriteString(r.DocumentID)

params = make(map[string]string)

Expand Down
4 changes: 2 additions & 2 deletions opensearchapi/api.exists_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ func (r ExistsSourceRequest) Do(ctx context.Context, transport Transport) (*Resp
path.WriteString("/")
path.WriteString(r.Index)
path.WriteString("/")
path.WriteString(r.DocumentID)
path.WriteString("/")
path.WriteString("_source")
path.WriteString("/")
path.WriteString(r.DocumentID)

params = make(map[string]string)

Expand Down
4 changes: 2 additions & 2 deletions opensearchapi/api.explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ func (r ExplainRequest) Do(ctx context.Context, transport Transport) (*Response,
path.WriteString("/")
path.WriteString(r.Index)
path.WriteString("/")
path.WriteString(r.DocumentID)
path.WriteString("/")
path.WriteString("_explain")
path.WriteString("/")
path.WriteString(r.DocumentID)

params = make(map[string]string)

Expand Down
4 changes: 2 additions & 2 deletions opensearchapi/api.get_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ func (r GetSourceRequest) Do(ctx context.Context, transport Transport) (*Respons
path.WriteString("/")
path.WriteString(r.Index)
path.WriteString("/")
path.WriteString(r.DocumentID)
path.WriteString("/")
path.WriteString("_source")
path.WriteString("/")
path.WriteString(r.DocumentID)

params = make(map[string]string)

Expand Down
4 changes: 2 additions & 2 deletions opensearchapi/api.termvectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ func (r TermvectorsRequest) Do(ctx context.Context, transport Transport) (*Respo
path.Grow(1 + len(r.Index) + 1 + len(r.DocumentID) + 1 + len("_termvectors"))
path.WriteString("/")
path.WriteString(r.Index)
path.WriteString("/")
path.WriteString("_termvectors")
if r.DocumentID != "" {
path.WriteString("/")
path.WriteString(r.DocumentID)
}
path.WriteString("/")
path.WriteString("_termvectors")

params = make(map[string]string)

Expand Down
4 changes: 2 additions & 2 deletions opensearchapi/api.update.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ func (r UpdateRequest) Do(ctx context.Context, transport Transport) (*Response,
path.WriteString("/")
path.WriteString(r.Index)
path.WriteString("/")
path.WriteString(r.DocumentID)
path.WriteString("/")
path.WriteString("_update")
path.WriteString("/")
path.WriteString(r.DocumentID)

params = make(map[string]string)

Expand Down

0 comments on commit abf672c

Please sign in to comment.