Closed epsilonmb closed 1 year ago
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.
Describe the bug When searching for documents using CloudSearchDomain.search, if expression contains outcome of anther expression, SearchException is thrown.
Is the issue in the browser/Node.js? Node.js
If on Node.js, are you running this on AWS Lambda? No
Details of the browser/Node.js version Paste output of
npx envinfo --browsers
ornode -v
12.20SDK version number v2.1019.0
To Reproduce (observed behavior) 1) create cloudsearch domain with 2 fields
location - type latlon 2) run below query should throw error (doesn't require any data)
SearchException: undefined field: "distance"
Expected behavior No error should be thrown - Outcome of expression can be used as described in below link https://docs.aws.amazon.com/ko_kr/cloudsearch/latest/developerguide/searching-locations.html
Rest api works - myrank is calculated with distance https://xxx.ap-northeast-1.cloudsearch.amazonaws.com/2013-01-01/search?q.parser=structured&q=country:'KR'&expr.distance=haversin(38.958687,-77.343149,location.latitude,location.longitude)&expr.myrank=log10(distance)
Thanks in advance Scott