Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GOCBC-428: Make search parse errors as object or array
Motivation ---------- Errors in search response are object or array, not just array. Changes ------- Make search parse the errors as an interface and then type assert them into the correct format, still returning a []string. Change-Id: Iecfd553eeeddc7f525001688b18ca97e9eb1d19b Reviewed-on: http://review.couchbase.org/107797 Reviewed-by: Brett Lawson <brett19@gmail.com> Tested-by: Charles Dixon <chvckd@gmail.com>
- Loading branch information
Showing
3 changed files
with
117 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"status": { | ||
"total": 6, | ||
"failed": 6, | ||
"successful": 0, | ||
"errors": { | ||
"travel_a464a32f957f35f1_13aa53f3": "context deadline exceeded", | ||
"travel_a464a32f957f35f1_18572d87": "context deadline exceeded", | ||
"travel_a464a32f957f35f1_54820232": "context deadline exceeded", | ||
"travel_a464a32f957f35f1_6ddbfb54": "context deadline exceeded", | ||
"travel_a464a32f957f35f1_aa574717": "context deadline exceeded", | ||
"travel_a464a32f957f35f1_f4e0a48a": "context deadline exceeded" | ||
} | ||
}, | ||
"request": { | ||
"query": { | ||
"boost": null, | ||
"match_all": {} | ||
}, | ||
"size": 1000, | ||
"from": 0, | ||
"highlight": null, | ||
"fields": [ | ||
"*" | ||
], | ||
"facets": null, | ||
"explain": false, | ||
"sort": [ | ||
"-_score" | ||
], | ||
"includeLocations": false | ||
}, | ||
"hits": null, | ||
"total_hits": 0, | ||
"max_score": 0, | ||
"took": 32464205, | ||
"facets": null | ||
} |