barisusakli
45afe2e831
cast return to bool
11 years ago
barisusakli
c8692f0562
Merge remote-tracking branch 'origin/0.5.1' into cluster
11 years ago
barisusakli
f81acd37db
added indices on search key and id for mongo
11 years ago
barisusakli
84d0e64361
fix topic move
11 years ago
barisusakli
10b30e303b
mongo posting fix
11 years ago
barisusakli
94d050fd4f
removed helpers.done
11 years ago
barisusakli
8b4c61241f
query change
11 years ago
barisusakli
0c8c6632d9
create index on key value
11 years ago
barisusakli
487793e692
create index on score field
11 years ago
barisusakli
cd096f8832
sortedSetScores for tag counts
11 years ago
barisusakli
e10eaf0d50
added tag counts to api return
11 years ago
barisusakli
c358ff3d83
fix isSortedSetMembers on mongo
11 years ago
barisusakli
5e68e0b009
same deal as previous commit
11 years ago
barisusakli
e137baccd9
fixed ip:recent weird
11 years ago
barisusakli
528ee335d5
optimize getTopicsByTids and getTeasers
11 years ago
barisusakli
b4182f57fe
simplified callback
11 years ago
barisusakli
efdd795084
closes #1922
11 years ago
barisusakli
eeb4c9f487
optimize getPostSummaryByPids
11 years ago
barisusakli
1a68fe5a26
possible fix for #1909
11 years ago
barisusakli
68cf064b1e
cleaned up a bit
11 years ago
barisusakli
d0a0d02d31
mongodb list fix
11 years ago
barisusakli
d7520508e3
#1375 part1
11 years ago
psychobunny
60e74cc2c3
LTRIM support for mongo
11 years ago
psychobunny
7327730252
LTRIM support for redis
11 years ago
barisusakli
3829019bfa
removed optional params
11 years ago
barisusakli
8dce99250b
final fix for #1884
...
fix mongo functions so they return correct data if duplicate keys are
passed. getObjects(['post:1', 'post:1'], callback) was only returning
one object.
11 years ago
barisusakli
a3fecee781
removed console.log err check
11 years ago
barisusakli
89bb11a58c
closes #1880
11 years ago
barisusakli
d00740703b
use the new $text query from mongo 2.6
11 years ago
barisusakli
9d7a8fcc0b
getSortedSetRevRangeWithScores
11 years ago
barisusakli
b5df5c0a91
closes #1562 , level session
11 years ago
barisusakli
53d68be7c0
level sortedSetsRemove
11 years ago
barisusakli
37b73e1c02
cleaner mongo setRemoveRandom
11 years ago
barisusakli
38494a2af0
pass in session directly
11 years ago
barisusakli
24ebf20d7e
first commit
11 years ago
barisusakli
9aacb5e259
remove dupe code
11 years ago
barisusakli
c3a9767bf6
late night optimizations
...
-isMemberOfSets returns true/false instead of 1/0
-when loading the posts of a topic only get the userdata for each user
once, before this commit if a topic had 10 posts from 2 different users
we were getting the user data for each user 5 times (drunk)
-getVoteStatusByPostIDs and getFavouritesByPostIDs no longer make
pids.length calls to the db, they use isMemberOfSets now
-getUserInfoForPost renamed to getUserInfoForPosts and doesnt make
uids.length calls to db, uses getMultipleUserFields instead
11 years ago
barisusakli
d3fc71529a
callback
11 years ago
barisusakli
f80b3c3b66
simpler union
11 years ago
barisusakli
7f534cc7b8
sorted set refactor
11 years ago
barisusakli
e6d8e9c959
searchIndex callbacks
11 years ago
barisusakli
fd12ec763a
sortedSetsRemove
...
instead of calling sortedSetRemove() one at a time for each id remove
value from multiple sortedSets with one db call
11 years ago
Charles
90b2d766f7
Fix callback execution in redis search
...
`callback` should be passed to `reds.search` otherwise the execution will be overlapped.
For example in the plugin `nodebb-plugin-dbsearch':
```javascript
db.searchRemove('topic', tid, function() {
if (typeof title === 'string' && title.length) {
db.searchIndex('topic', title, tid);
}
if (typeof callback === 'function') {
callback();
}
});
```
The actual execution is like this
```
1402387863.625553 [0 127.0.0.1:16660] "zrevrangebyscore" "nodebbtopicsearch:object:6" "+inf" "0"
1402387863.625891 [0 127.0.0.1:16660] "MULTI"
1402387863.626043 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:123" "1" "6"
1402387863.626052 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "123"
1402387863.626060 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:TST" "1" "6"
1402387863.626065 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "TST"
1402387863.626071 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:AN0" "1" "6"
1402387863.626076 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "AN0"
1402387863.626083 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:TPK" "1" "6"
1402387863.626092 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "TPK"
1402387863.626104 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:ETTT" "1" "6"
1402387863.626116 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "ETTT"
1402387863.626130 [0 127.0.0.1:16660] "EXEC"
1402387863.626253 [0 127.0.0.1:16660] "del" "topic:6:tags"
1402387863.626281 [0 127.0.0.1:16660] "MULTI"
1402387863.626515 [0 127.0.0.1:16660] "del" "nodebbtopicsearch:object:6"
1402387863.626524 [0 127.0.0.1:16660] "EXEC"
```
The key nodebbtopicsearch:object is added and then just being deleted again.
11 years ago
Julian Lam
584fe60284
fixed #1554 , redis error handling will go back to crashing the error (though the error will be logged at least)
11 years ago
Julian Lam
b1eb5b175c
Merge remote-tracking branch 'origin/master' into groups-pages
...
Conflicts:
src/topics/tags.js
11 years ago
barisusakli
b7fcde446b
proper score aggregation #1562
11 years ago
barisusakli
7585b72644
remove duplicates
11 years ago
barisusakli
b32bb76429
#1562
11 years ago
Julian Lam
7afe3bea59
added getSortedSetRevUnion... just because.
11 years ago
Julian Lam
6e597a9cdb
fixed tests, and added getSortedSetUnion method to redis db, added test for new redis method
11 years ago