In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
What are the query selectors for mongodb? To solve this problem, today the editor summarizes this article about mongodb's query selector, hoping to help more friends who want to solve this problem to find a more simple and easy way.
Query selector:
$eq matches a value equal to the specified value. $gt matches a value greater than the specified value. $gte matches values that are greater than or equal to the specified value. $in matches any value specified in the array. $lt matches a value that is less than the specified value. $lte matches values that are less than or equal to the specified value. $ne matches all values that are not equal to the specified value. $nin does not match any of the values specified in the array.
Logic selector
$and logically joins the query clause AND to return all documents for which both clauses match. $not reverses the effect of the query expression and returns documents that do not match the query expression. $nor logically joins the query clause NOR to return all documents whose two clauses do not match. $or logically joins the query clause OR to return all documents that meet the criteria of any clause.
Element selector
The $exists match has whether the specified field exists. $type matches the field type
Evaluation
$expr allows the use of aggregate expressions in the query language. JsonSchema validates the document against the given JSON Schema. Mod performs modular operations on the value of the field and selects the document with the specified result. $regex selects a document whose value matches the specified regular expression. Text performs a text search. $where matches documents that satisfy JavaScript expressions.
Geographic space
$geoIntersects selects the geometry that intersects the GeoJSON geometry. The 2dsphere index supports $geoIntersects. GeoWithin selects the geometry within the boundary GeoJSON geometry. The 2dsphere and 2D metrics support $geoWithin. $near returns a geospatial object near the point of return. Geospatial index is required. The 2dsphere and 2D metrics support $near. NearSphere returns a geospatial object near a point on the sphere. Geospatial index is required. The 2dsphere and 2D metrics support $nearSphere.
Array
$all matches the array $elemMatch that contains all the elements specified in the query. If the element in the array field meets all the specified $elemMatch criteria, select the document. Size Select the document if the array field is the specified size.
Bit by bit
Both the numeric or binary values of $bitsAllClear that match one of the set of bit positions have a value of 0. Both numeric and binary values of $bitsAllSet that match one of the set of bit positions have a value of 1. $bitsAnyClear matches numeric or binary values, where the value of any bit in a set of bit positions is 0. $bitsAnySet matches numeric or binary values, where the value of any bit in a set of bit positions is 1.
Annotation
$comment adds comments to the query predicate.
Projection operator
$projects the first element in an array that matches the query criteria. The first element in the array in which the $elemMatch projection matches the specified $elemMatch condition. $meta projects the document score assigned during the $text operation. Slice limits the number of elements projected from the array. Skip and limit slices are supported.
After reading the above, do you have any further understanding of mongodb's query selector? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.