Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.6.7
-
None
-
Couchbase Node connector commit https://github.com/couchbase/couchnode/commit/674cd993406625542a71142c2f4be68b0709739a
-
1
Description
After pulling code from commit JSCBC-576: Fixed GeoDistanceQuery to build example code. Example code threw an error upon attempting to run a geospatial query in the following format:
const geo = SearchQuery.geoDistanceQuery(100,150,300);
|
this is the correct way to set up the Query as defined by the API Docs.
Error thrown:
Error: An FTS error occured: {"error":"rest_index: Query, indexName: Location, err: bleve: QueryBleve parsing searchRequest, err: struct { Location interface {} \"json:\\\"location,omitempty\\\"\"; Distance string \"json:\\\"distance,omitempty\\\"\"; FieldVal string \"json:\\\"field,omitempty\\\"\"; BoostVal *query.Boost \"json:\\\"boost,omitempty\\\"\" }: Distance: ReadString: expects \" or n, but found 3, error found in #10 byte of ...|istance\":300,\"locati|..., bigger context ...|{\"distance\":300,\"location\":[100,150]}|...","request":{"ctl":{"timeout":75000},"highlight":{"fields":[null]},"indexName":"Location","query":{"distance":300,"location":[100,150]},"size":100},"status":"fail"}
|
This error message seems to suggest an error is thrown as the function that runs FTS queries attempts to read the distance value as a string, when it is specified in the docstring that it should be passed as a number.