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
Every document has a field facets which is an array of object. Each object in the array has two fields: id: <string> and values: [<string>]. My model file is attached with this ticket: seo_media_details.txt
Now when I try to query the REST API build with this plugin with following code
, it doesn't work, I get following error. error.txt.
The text was updated successfully, but these errors were encountered:
abhishekvaid
changed the title
A specific query isn't working. Tried on shell and it's working.
A specific mongo query not working with query parameter. Cast Error encountered.
Dec 12, 2017
{ "_id" : ObjectId("599c05310252805c00f4f03d"), "facets" : [ { "id" : "culture", "values" : [ "hindu" ] }, { "id" : "occasion", "values" : [ "pre_wedding_shoot" ] }, { "id" : "photo_bucket", "values" : [ "wedding_photography" ] }, { "id" : "style_of_photography", "values" : [ "traditional" ] } ] }
Every document has a field
facets
which is an array of object. Each object in the array has two fields:id: <string>
andvalues: [<string>]
. My model file is attached with this ticket:seo_media_details.txt
Now when I try to query the REST API build with this plugin with following code
requestPromise({ uri: localhost:3000/api/v1/seo_media_details, qs: { query: JSON.stringify({ 'facets': { '$all': [ { 'id': "xxx", 'values': ['a', 'b', 'c'] } ] } }, resolveWithFullResponse: true }).then( ... )
values
from an array to a single item. It works.requestPromise({ uri: localhost:3000/api/v1/seo_media_details, qs: { query: JSON.stringify({ 'facets': { '$all': [ { 'id': "xxx", 'values': 'a'} ] } }, resolveWithFullResponse: true }).then( ... )
, it doesn't work, I get following error.
error.txt.
The text was updated successfully, but these errors were encountered: