サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
新内閣発足
emptysqua.re
Wikimedia commons Yesterday we released the latest unstable version of MongoDB; the headline feature is basic full-text search. You can read all about MongoDB's full text search in the release notes. This blog had been using a really terrible method for search, involving regular expressions, a full collection scan for every search, and no ranking of results by relevance. I wanted to replace all th
Courtesy The Beinecke Library How do you create the best index for a complex MongoDB query? I'll present a method specifically for queries that combine equality tests, sorts, and range filters, and demonstrate the best order for fields in a compound index. We'll look at the explain() output to see exactly how well it performs, and we'll see how the MongoDB query-optimizer selects an index. Content
The Weirdness What do you think this script prints?: import thread, threading, sys class Weeper(object): def del(self): sys.stdout.write('oh cruel world %s\n' % thread.get_ident()) local = threading.local() def target(): local.weeper = Weeper() t = threading.Thread(target=target) t.start() t.join() sys.stdout.write('done %s\n' % thread.get_ident()) getattr(local, 'whatever', None)
このページを最初にブックマークしてみませんか?
『emptysqua.re』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く