Dear sir,
I am testing elasticsearch-river-couchdb(1.2.0). I have tried to follow the different tutorials and post on index and mapping attached document in a couchdb database for days without success. After running the codes below i don't have any hits from words that exist in the couchdb attached files.
software version:
CouchDB: 1.2.1
elasticsearch-river-couchdb: 1.2.0
elasticsearch: 0.90
elasticsearch-mapper-attachments: 1.7.0
1.create a index
curl -XPUT "http://127.0.0.1:9200/pdfcouchindex"
2.create a mapping
curl -XPUT 'http://127.0.0.1:9200/pdfcouchindex/pdftype/_mapping' -d '{
"pdftype": {
"properties" : {
"_attachments": {
"properties": {
""attachment"": {
"type": "attachment","index" : "analyzed"
}
}
},
"title": {
"type": "string"
}
}
}
}'
-
create the river
curl -XPUT "http://127.0.0.1:9200/_river/pdfcouchindex/_meta" -d '
{
"type": "couchdb",
"couchdb": {
"host": "127.0.0.1",
"port": "5984",
"db": "pdfcouch",
"filter": null
},
"index": {
"index": "pdfcouchindex",
"type": "pdftype"
}
}'
-
Retrieve the indexed document by the keyword
(1) curl -XPOST 'http://localhost:9200/pdfcouchindex/pdftype/_search?pretty=true' -d '{"query" : {"text" : { "_all" : "Abstraction" } } }'
{
"took" : 7,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
(2)http://localhost:9200/pdfcouchindex/pdftype/_search?q=*&pretty=true
{
"took" : 9,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 2,
"max_score" : 1.0,
"hits" : [ {
"_index" : "pdfcouchindex",
"_type" : "pdftype",
"_id" : "60699284e3faaeef260fc43e7e00678a",
"_score" : 1.0, "_source" : {"_rev":"1-6dc6e91540ad3ccc4a0d54f66c7574ac","authors":"","organization":"","title":"mongodb","keywords":"","issn":"","abstracts":"","_id":"60699284e3faaeef260fc43e7e00678a","address":"","_attachments":{"attachment":{"stub":true,"length":366987,"digest":"md5-G52n3UVybIbCOuQe5eX2dg==","revpos":1,"content_type":"application/pdf"}},"foundation":"","media":""}
}, {
"_index" : "pdfcouchindex",
"_type" : "pdftype",
"_id" : "60699284e3faaeef260fc43e7e006d81",
"_score" : 1.0, "_source" : {"_rev":"1-2de491d3982a9f7ae0fb9b928dfc6c2e","authors":"","organization":"","title":"mongodb","keywords":"","issn":"","abstracts":"","_id":"60699284e3faaeef260fc43e7e006d81","address":"","_attachments":{"attachment":{"stub":true,"length":2357103,"digest":"md5-29s/N7EvL0E97d2uDqOkGw==","revpos":1,"content_type":"application/pdf"}},"foundation":"","media":""}
} ]
}
}