You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 8, 2018. It is now read-only.
Express
500 Error: SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[Ea5gAOiqTOeZRKSfXTHfyA][popit_eduskunta][0]: SearchParseException[[popit_eduskunta][0]: from[0],size[30]: Parse Failure [Failed to parse source [{"from":0,"size":30,"query":{"query_string":{"query":"start_date:[2013/01/01 TO 2013/12/31]","lowercase_expanded_terms":true,"analyze_wildcard":false}}}]]]; nested: ElasticSearchParseException[failed to parse date field [2013/01/01], tried both date format [dateOptionalTime], and timestamp number]; nested: IllegalArgumentException[Invalid format: "2013/01/01" is malformed at "/01/01"]; }{[Ea5gAOiqTOeZRKSfXTHfyA][popit_eduskunta][2]: SearchParseException[[popit_eduskunta][2]: from[0],size[30]: Parse Failure [Failed to parse source [{"from":0,"size":30,"query":{"query_string":{"query":"start_date:[2013/01/01 TO 2013/12/31]","lowercase_expanded_terms":true,"analyze_wildcard":false}}}]]]; nested: ElasticSearchParseException[failed to parse date field [2013/01/01], tried both date format [dateOptionalTime], and timestamp number]; nested: IllegalArgumentException[Invalid format: "2013/01/01" is malformed at "/01/01"]; }{[Ea5gAOiqTOeZRKSfXTHfyA][popit_eduskunta][1]: SearchParseException[[popit_eduskunta][1]: from[0],size[30]: Parse Failure [Failed to parse source [{"from":0,"size":30,"query":{"query_string":{"query":"start_date:[2013/01/01 TO 2013/12/31]","lowercase_expanded_terms":true,"analyze_wildcard":false}}}]]]; nested: ElasticSearchParseException[failed to parse date field [2013/01/01], tried both date format [dateOptionalTime], and timestamp number]; nested: IllegalArgumentException[Invalid format: "2013/01/01" is malformed at "/01/01"]; }{[Ea5gAOiqTOeZRKSfXTHfyA][popit_eduskunta][4]: SearchParseException[[popit_eduskunta][4]: from[0],size[30]: Parse Failure [Failed to parse source [{"from":0,"size":30,"query":{"query_string":{"query":"start_date:[2013/01/01 TO 2013/12/31]","lowercase_expanded_terms":true,"analyze_wildcard":false}}}]]]; nested: ElasticSearchParseException[failed to parse date field [2013/01/01], tried both date format [dateOptionalTime], and timestamp number]; nested: IllegalArgumentException[Invalid format: "2013/01/01" is malformed at "/01/01"]; }{[Ea5gAOiqTOeZRKSfXTHfyA][popit_eduskunta][3]: SearchParseException[[popit_eduskunta][3]: from[0],size[30]: Parse Failure [Failed to parse source [{"from":0,"size":30,"query":{"query_string":{"query":"start_date:[2013/01/01 TO 2013/12/31]","lowercase_expanded_terms":true,"analyze_wildcard":false}}}]]]; nested: ElasticSearchParseException[failed to parse date field [2013/01/01], tried both date format [dateOptionalTime], and timestamp number]; nested: IllegalArgumentException[Invalid format: "2013/01/01" is malformed at "/01/01"]; }]
at respond (/data/vhost/popit.mysociety.org/popit/node_modules/popit-api/node_modules/elasticsearch/src/lib/transport.js:225:15)
at checkRespForFailure (/data/vhost/popit.mysociety.org/popit/node_modules/popit-api/node_modules/elasticsearch/src/lib/transport.js:193:7)
at HttpConnector. (/data/vhost/popit.mysociety.org/popit/node_modules/popit-api/node_modules/elasticsearch/src/lib/connectors/http.js:152:7)
at IncomingMessage.bound (/data/vhost/popit.mysociety.org/popit/node_modules/popit-api/node_modules/elasticsearch/node_modules/lodash-node/modern/internals/baseBind.js:56:17)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
As well as changing the documentation (which I would have done, except I'm not sure where the definitive version currently is — popit.poplus.org?), we probably want to handle errors like this better too.
Until mysociety/popit.poplus.org#3 is tackled the documentation in this repository remains the definitive version. I agree that the error handling in popit is generally a bit lacking, I've opened #453 to track that.
The docs say to do
/api/v0.1/search/memberships?q=start_date:[2013/01/01+TO+2013/12/31]
However http://eduskunta.popit.mysociety.org/api/v0.1/search/memberships?q=start_date:[2013/01/01+TO+2013/12/31] 500s:
http://eduskunta.popit.mysociety.org/api/v0.1/search/memberships?q=start_date:[2013-01-01+TO+2013-12-31] works as expected.
The text was updated successfully, but these errors were encountered: