Bad Addy
Posts: 0
Joined: Fri Dec 13, 2013 9:34 pm

Server Code Criteria Params not working

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 ?

Bad Addy
Posts: 0
Joined: Fri Dec 13, 2013 9:34 pm

Server Code Criteria Params not working

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...

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Server Code Criteria Params not working

Hi,

Are there any errors in Trace tab?

Return to “Issues”