Skip to content

Commit

Permalink
Add PositionLength to IndicesAnalyzeResponseToken
Browse files Browse the repository at this point in the history
JSON seems wrong as it uses camelCase, not snake_case.

Close olivere#1126
  • Loading branch information
olivere committed Jun 30, 2019
1 parent 6bbce02 commit c420147
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions indices_analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,12 @@ type IndicesAnalyzeResponse struct {
}

type IndicesAnalyzeResponseToken struct {
Token string `json:"token"`
StartOffset int `json:"start_offset"`
EndOffset int `json:"end_offset"`
Type string `json:"type"`
Position int `json:"position"`
Token string `json:"token"`
StartOffset int `json:"start_offset"`
EndOffset int `json:"end_offset"`
Type string `json:"type"`
Position int `json:"position"`
PositionLength int `json:"positionLength"` // seems to be wrong in 7.2 (no snake_case), see https://github.com/elastic/elasticsearch/blob/7.2/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/AnalyzeResponse.java
}

type IndicesAnalyzeResponseDetail struct {
Expand Down

0 comments on commit c420147

Please sign in to comment.