Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ElasticSearch] Queries not working in 6.2 #134

Open
nimbinatus opened this issue Aug 14, 2018 · 0 comments
Open

[ElasticSearch] Queries not working in 6.2 #134

nimbinatus opened this issue Aug 14, 2018 · 0 comments
Labels

Comments

@nimbinatus
Copy link
Member

Looks like the queries from https://github.com/deconst/content-service/blob/master/src/storage/remote.js#L375-L384 are somehow not rendering correctly. Needs to be examined.

<TDS> verbose: GET /search?q=deconstruct&categories%5B0%5D=deconst.horse
{ route: 'GET /search', reqDuration: 0 }
<TDS> trace:
{ message: 'Elasticsearch HTTP request',
   httpMethod: 'POST',
   requestUrl: 'https://<es_url>/envelopes_current/envelope/_search%3Ffrom=0&size=10&ignore_unavailable=true'>,
   requestBody: '{"query":{"bool":{"must":{"match":{"all":"deconstruct"},"filter":{"terms":{"categories":["deconst.horse"]}}}}},"highlight":{"fields":{"body":{}}}}',
   responseBody: '{"error":{"root_cause":[{"type":"parsing_exception","reason":"[match] malformed query, expected [END_OBJECT] but found [FIELD_NAME]","line":1,"col":57}],"type":"parsing_exception","reason":"[match] malformed query, expected [END_OBJECT] but found [FIELD_NAME]","line":1,"col":57},"status":400}',
   responseStatus: 400 }
<TDS> debug:
{ action: 'elasticsearch', message: 'Request complete' }
<TDS> error: Error performing search 
{ query: 'deconstruct',
   perPage: 10,
   pageNumber: 1,
   categories: [ 'deconst.horse' ],
   route: 'GET /search',
   reqDuration: 9,
   error: '[parsing_exception] [match] malformed query, expected [END_OBJECT] but found [FIELD_NAME], with { line=1 & col=57 }',
   statusCode: 400,
   stack: 'Error: [parsing_exception] [match] malformed query, expected [END_OBJECT] but found [FIELD_NAME], with { line=1 & col=57 }\n    at respond (/opt/app-root/src/node_modules/elasticsearch/src/lib/transport.js:307:15)\n    at checkRespForFailure (/opt/app-root/src/node_modules/elasticsearch/src/lib/transport.js:266:7)\n    at HttpConnector.<anonymous> (/opt/app-root/src/node_modules/elasticsearch/src/lib/connectors/http.js:159:7)\n    at IncomingMessage.bound (/opt/app-root/src/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)\n    at emitNone (events.js:72:20)\n    at IncomingMessage.emit (events.js:166:7)\n    at endReadableNT (_stream_readable.js:923:12)\n    at nextTickCallbackWith2Args (node.js:458:9)\n    at process._tickDomainCallback (node.js:413:17)' }
@nimbinatus nimbinatus added the bug label Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant