Is there any functionality in mongo to retrieve closest string match lookups. For example, Entries in the database are like:
- title: "bananashake"
- title: "bananasweet"
- title: "bananaturl"
- and so forth...
假设用户输入了一些像“香蕉weeest”的文字。
Is there any functionality in mongo to retrieve closest string match lookups. For example, Entries in the database are like:
假设用户输入了一些像“香蕉weeest”的文字。
Since Mongodb v2.4
, you can create a Fulltext index to search through your data by creating an index
db.reviews.ensureIndex( { comments: "text" } )
您显然正在寻找在 MOngoDB 中无法使用的全文功能。 查看 Solr 或 ElasticSearch - 不属于 MOngoDB 范围 。
视您在寻找什么具体内容而定,您可以用一个regex 查询来做到这一点: < a href="http://www.mongodb.org/display/DOCS/Advancedueries#AdvancedQueries-RegularExpressions\ rel=“nofollow”>http://www.mongodb.org/display/DOCS/Advancedueries#AdvancedQueries-RegularExpressions
是的,我同意,Solr和ElasticSearch是一个很好的替代办法。您也可以花时间在Jira就这个服务器问题进行投票:https://jira.mongodb.org/browse/SERVER-380
I need to use query strings in a URL, but need to ensure that they haven t been tampered with. I found a solution which almost works, but the encoded strings get mangled by a service my app needs to ...
Lets say I ve got an online dating site, users can filter the user list based on various criteria, Height, Age, BodyType, Ethnic Origin.... I want to pass the criteria to the pager, via QueryString. ...
I m presented with a problem of using query string variables in a RESTful Asp.net MVC application. Does that violate the RESTful pattern? The thing is that Asp.net MVC uses default route like: /...
I am using ExtJS to send an Ajax request to a PHP page on a server, wanting to send the parameters as POST variables rather than in the querystring. I have included a random token in the querystring ...
I need to maintain the querystring in all pages in my asp.net mvc(C#) application. For ex.: I will call a page www.example.com?Preview=True. The querystring should be maintained whatever the page i ...
what I m looking for is the ability for nginx to detect that a url has the query string variable cid. for example www.adomain.com/froggy?cid=12&as=false (query string can be solo or mixed with ...
I m writing a method which, let s say, given 1 and hello should return http://something.com/?something=1&hello=en. I could hack this together pretty easily, but what abstraction functionality ...
http://localhost/?area=characters&name=Michal+Stroganof $result = mysql_query("SELECT * from players WHERE name = $_GET[name] "); while ($row = mysql_fetch_assoc($result)) { echo "Name: " ....