Page 1 of 1

Server Code Criteria Params not working

Posted: Mon Jun 16, 2014 6:57 pm
by Bad Addy

I have the following code:

pre
search1Params.criteria = {
"$and" : [{"property_active" : 1},
{"property_type": type},
{"$or" : [{"property_address_city" : {"$regex" : location}},
{"property_address_county" : {"$regex" : location}},
{"property_address_postcode ": {"$regex" : location}}
]
}
]
}

var search1 = Collection.query(dbid, "property", search1Params, sToken);
/pre

I have matched location and type with the correct fields in the database, so it should bring back one record. Instead I get no records and no errors. After searching on here, the Docs and Mongo, I cannot see what I am doing wrong ?


Server Code Criteria Params not working

Posted: Mon Jun 16, 2014 7:05 pm
by Bad Addy

I have use this as an example, and remove all the quotes, it still gives the same none response, and still no errors

http://docs.mongodb.org/manual/refere...


Server Code Criteria Params not working

Posted: Mon Jun 16, 2014 8:02 pm
by Kateryna Grynko

Hi,

Are there any errors in Trace tab?