Permalink
Browse files

Update README.md

Signed-off-by: Richard Louapre <richard.louapre@gmail.com>
  • Loading branch information...
1 parent 6e2b1d4 commit 153dfaa7d085a479d2f6c531025f6fd295acd3c2 @richardwilly98 committed Mar 4, 2012
Showing with 18 additions and 20 deletions.
  1. +18 −20 README.md
View
@@ -47,35 +47,33 @@ Example:
}'
Import data from mongo console:
-`
-> use testmongo
-> var p = {firstName: "John", lastName: "Doe"}
-> db.person.save(p)
-`
+ use testmongo
+ var p = {firstName: "John", lastName: "Doe"}
+ db.person.save(p)
Query index:
-`curl -XGET "http://localhost:9200/testmongo/_search?q=firstName:John"`
+ curl -XGET "http://localhost:9200/testmongo/_search?q=firstName:John"
-curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{
- "type": "mongodb",
- "mongodb": {
- "db": "testmongo",
- "collection": "files",
- "gridfs": true
- },
- "index": {
- "name": "mongoindex",
- "type": "files"
- }
-}'
+ curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{
+ "type": "mongodb",
+ "mongodb": {
+ "db": "testmongo",
+ "collection": "files",
+ "gridfs": true
+ },
+ "index": {
+ "name": "mongoindex",
+ "type": "files"
+ }
+ }'
- Import binary content in mongo:
-`%MONGO_HOME%\bin>mongofiles.exe --host localhost:27017 --db testmongo --collection files put test-document-2.pdf`
+ %MONGO_HOME%\bin>mongofiles.exe --host localhost:27017 --db testmongo --collection files put test-document-2.pdf
connected to: localhost:27017
added file: { _id: ObjectId('**4f230588a7da6e94984d88a1**'), filename: "test-document-2.pdf", chunkSize: 262144, uploadDate: new Date(1327695240206), md5: "c2f251205576566826f86cd969158f24", length: 173293 }
done!
Query index:
-`curl -XGET "http://localhost:9200/files/4f230588a7da6e94984d88a1?pretty=true"`
+ curl -XGET "http://localhost:9200/files/4f230588a7da6e94984d88a1?pretty=true"
See more details check the [wiki](https://github.com/richardwilly98/elasticsearch-river-mongodb/wiki)

0 comments on commit 153dfaa

Please sign in to comment.