Skip to content

Instantly share code, notes, and snippets.

@jamescarr
Created March 13, 2012 15:16
Show Gist options
  • Save jamescarr/2029361 to your computer and use it in GitHub Desktop.
Save jamescarr/2029361 to your computer and use it in GitHub Desktop.
$ES_HOME\bin\plugin -install elasticsearch/elasticsearch-mapper-attachments/1.2.0
$ES_HOME\bin\plugin -install richardwilly98/elasticsearch-river-mongodb/1.1.0
sudo service elasticsearch restart
# from log:
# [2012-03-12 23:08:21,790][INFO ][plugins ] [Franz Kafka] loaded [river-mongodb, mapper-attachments], sites []
curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{
"type": "mongodb",
"mongodb": {
"db": "testmongo",
"collection": "person"
},
"index": {
"name": "mongoindex",
"type": "person"
}
}'
mongo
use testmongo
var p = {firstName: "John", lastName: "Doe"}
db.person.save(p)
exit
curl -XGET "http://localhost:9200/testmongo/_search?q=firstName:John"
@jamescarr
Copy link
Author

No results are returned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment