This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbpath=<some path> | |
logpath=<some path> | |
fork=true | |
auth = true | |
setParameter = authenticationMechanisms=GSSAPI | |
sslOnNormalPorts = true | |
sslPEMKeyFile = /etc/ssl/mongodb.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[logging] | |
default = FILE:/var/log/krb5libs.log | |
kdc = FILE:/var/log/krb5kdc.log | |
admin_server = FILE:/var/log/kadmind.log | |
[libdefaults] | |
default_realm = MONGOTEST.COM | |
dns_lookup_realm = false | |
dns_lookup_kdc = false | |
ticket_lifetime = 24h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongo-connector -m localhost:27017 -t localhost:9200 --fields title,text -d mongo_connector/doc_managers/elastic_doc_manager.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongo-connector -m localhost:27017 -t localhost:9200 -d mongo_connector/doc_managers/elastic_doc_manager.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPOST ‘http://localhost:9200/reddit.posts/_search’ -d’{ | |
"query": { | |
"match": { | |
"title": { | |
"query": "kiten", | |
"fuzziness": 2, | |
"prefix_length": 1 | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPOST ‘http://localhost:9200/reddit.posts/_search’ -d’{ | |
"query": { | |
"match": { | |
"title": { | |
"query": "kitten", | |
"fuzziness": 2, | |
"prefix_length": 1 | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cleanUpLong(max_running_secs) { | |
var currentOps = db.currentOp({ | |
$and: [{ op: "query" }, | |
{ msg: { $exists: false } }, // not a sharding operation! | |
{ | |
secs_running: { $gt: max_running_secs } | |
}, | |
{"ns": "backstage.action_loc" }] | |
}); | |
currentOps.inprog.forEach(function (op) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.action_loc.ensureIndex({ location : "2dsphere", time : 1 }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"location" : { | |
"type" : "Point", | |
"coordinates" : [ Double, Double ] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.location.ensureIndex({ location : "2d", time : 1 }) |