**
What is the other file you are talking about?
You have 2 docs in couchDB?
What are theses docs?
David
Le 10 août 2012 à 11:38, rami sellami sel.rami@gmail.com a écrit :
This is the result of the POST query, I do not see the other file!!
{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "rs",
"_type" : "rs",
"_id" : "bcd20f6c77198921be8af0ea69000d91",
"_score" : 1.0, "_source" :
{"_rev":"1-f62208cb5761dd5c7d1c5954dfba0e7a","forename":"Gavin","_id":"bcd20f6c77198921be8af0ea69000d91","surname":"Cooper","type":"person"}
} ]
}
}
2012/8/10 David Pilato david@pilato.fr
So CouchDB river is working fine as we can see for rs/rs lastseq=2.
Then, we can see your document in result:
{
"_index":"rs",
"_type":"rs",
"_id":"bcd20f6c77198921be8af0ea69000d91",
"_score":1.0,
"_source":{
"_rev":"1-f62208cb5761dd5c7d1c5954dfba0e7a",
"forename":"Gavin",
"_id":"bcd20f6c77198921be8af0ea69000d91",
"surname":"Cooper",
"type":"person"
}
}
Stupid I am ! You have to POST your query... Don't use GET.
curl -XPOST http://localhost:9200/rs/rs/_search?pretty=true -d '{
"query" : {
"query_string" :{"query" : "*"}
}
}'
Le 10 août 2012 à 11:24, rami sellami < sel.rami@gmail.com> a écrit :
Yes I created a couchDB river index with:
curl -XPUT 'localhost:9200/_river/rs/_meta' -d '{
"type" : "couchdb",
"couchdb" : {
"host" : "localhost",
"port" : 5984,
"db" : "rs",
"filter" : null
},
"index" : {
"index" : "rs",
"type" : "rs",
"bulk_size" : "100",
"bulk_timeout" : "10ms"
}
}'
In addition, the index works, because I add the json file below and I get
it when I query on it:
{
"forename": "Gavin",
"surname": "Cooper",
"type": "person"
}.
This is the result if I query on all:
{"took":10,"timed_out":false,"_shards":{"total":57,"successful":10,"failed":47,"failures":[{"index":"db","shard":0,"status":500,"reason":"No
active shards"},{"index":"db","shard":1,"status":500,"reason":"No active
shards"},{"index":"db","shard":2,"status":500,"reason":"No active
shards"},{"index":"db","shard":3,"status":500,"reason":"No active
shards"},{"index":"db","shard":4,"status":500,"reason":"No active
shards"},{"index":"ckan-147.102.12.234","shard":0,"status":500,"reason":"No
active
shards"},{"index":"ckan-147.102.12.234","shard":1,"status":500,"reason":"No
active
shards"},{"index":"ckan-147.102.12.234","shard":2,"status":500,"reason":"No
active
shards"},{"index":"ckan-147.102.12.234","shard":3,"status":500,"reason":"No
active
shards"},{"index":"ckan-147.102.12.234","shard":4,"status":500,"reason":"No
active shards"},{"index":"twitter","shard":0,"status":500,"reason":"No
active shards"},{"index":"twitter","shard":1,"status":500,"reason":"No
active shards"},{"index":"twitter","shard":2,"status":500,"reason":"No
active shards"},{"index":"twitter","shard":3,"status":500,"reason":"No
active shards"},{"index":"twitter","shard":4,"status":500,"reason":"No
active shards"},{"index":"my_db","shard":0,"status":500,"reason":"No active
shards"},{"index":"my_db","shard":1,"status":500,"reason":"No active
shards"},{"index":"my_db","shard":2,"status":500,"reason":"No active
shards"},{"index":"my_db","shard":3,"status":500,"reason":"No active
shards"},{"index":"my_db","shard":4,"status":500,"reason":"No active
shards"},{"index":"test","shard":0,"status":500,"reason":"No active
shards"},{"index":"test","shard":1,"status":500,"reason":"No active
shards"},{"index":"test","shard":2,"status":500,"reason":"No active
shards"},{"index":"test","shard":3,"status":500,"reason":"No active
shards"},{"index":"test","shard":4,"status":500,"reason":"No active
shards"},{"index":"test","shard":5,"status":500,"reason":"No active
shards"},{"index":"test","shard":6,"status":500,"reason":"No active
shards"},{"index":"test","shard":7,"status":500,"reason":"No active
shards"},{"index":"test","shard":8,"status":500,"reason":"No active
shards"},{"index":"test","shard":9,"status":500,"reason":"No active
shards"},{"index":"kimchy","shard":2,"status":500,"reason":"No active
shards"},{"index":"blog","shard":0,"status":500,"reason":"No active
shards"},{"index":"blog","shard":1,"status":500,"reason":"No active
shards"},{"index":"blog","shard":2,"status":500,"reason":"No active
shards"},{"index":"blog","shard":3,"status":500,"reason":"No active
shards"},{"index":"blog","shard":4,"status":500,"reason":"No active
shards"},{"index":"mycouchshop","shard":0,"status":500,"reason":"No active
shards"},{"index":"mycouchshop","shard":1,"status":500,"reason":"No active
shards"},{"index":"mycouchshop","shard":2,"status":500,"reason":"No active
shards"},{"index":"mycouchshop","shard":3,"status":500,"reason":"No active
shards"},{"index":"mycouchshop","shard":4,"status":500,"reason":"No active
shards"},{"index":"another_user","shard":0,"status":500,"reason":"No active
shards"},{"index":"toto1","shard":0,"status":500,"reason":"No active
shards"},{"index":"toto1","shard":1,"status":500,"reason":"No active
shards"},{"index":"toto1","shard":2,"status":500,"reason":"No active
shards"},{"index":"toto1","shard":3,"status":500,"reason":"No active
shards"},{"index":"toto1","shard":4,"status":500,"reason":"No active
shards"}]},"hits":{"total":8,"max_score":1.0,"hits":[{"_index":"_river","_type":"rs","_id":"_meta","_score":1.0,
"_source" : {
"type" : "couchdb",
"couchdb" : {
"host" : "localhost",
"port" : 5984,
"db" : "rs",
"filter" : null
},
"index" : {
"index" : "rs",
"type" : "rs",
"bulk_size" : "100",
"bulk_timeout" : "10ms"
}
}},{"_index":"_river","_type":"test","_id":"_meta","_score":1.0, "_source"
: {
"type" : "couchdb",
"couchdb" : {
"host" : "localhost",
"port" : 5984,
"db" : "test",
"filter" : null
},
"index" : {
"index" : "test",
"type" : "test",
"bulk_size" : "100",
"bulk_timeout" : "10ms"
}
}},{"_index":"_river","_type":"test","_id":"_seq","_score":1.0, "_source"
:
{"couchdb":{"last_seq":"3"}}},{"_index":"_river","_type":"rs","_id":"_seq","_score":1.0,
"_source" :
{"couchdb":{"last_seq":"2"}}},{"_index":"_river","_type":"rs","_id":"_status","_score":1.0,
"_source" :
{"ok":true,"node":{"id":"LtttB4KXSHGdj_Y9ZkTxhg","name":"Archer","transport_address":"inet[/
157.159.110.99:9300]"}}},{"_index":"_river","_type":"test","_id":"_status","_score":1.0,
"_source" :
{"ok":true,"node":{"id":"LtttB4KXSHGdj_Y9ZkTxhg","name":"Archer","transport_address":"inet[/
157.159.110.99:9300]"}}},{"_index":"kimchy","_type":"tweet","_id":"2","_score":1.0,
"_source" :
{
"user": "kimchy",
"postDate": "2009-11-15T14:12:12",
"message": "Another tweet, will it be indexed?"
}},{"_index":"rs","_type":"rs","_id":"bcd20f6c77198921be8af0ea69000d91","_score":1.0,
"_source" :
{"_rev":"1-f62208cb5761dd5c7d1c5954dfba0e7a","forename":"Gavin","_id":"bcd20f6c77198921be8af0ea69000d91","surname":"Cooper","type":"person"}}]}}
2012/8/10 David Pilato david@pilato.fr
Are you sure you have indexed something ?
What about if you query on all:
curl -XGET http://localhost:9200/_search?query=*&pretty=true
Did you create a CouchDB river?
David
Le 10 août 2012 à 10:19, rami sellami < sel.rami@gmail.com> a écrit :
Dear all,
My problem is that I do not get any hits as a result of a query.
My input is the imported json file (SampleOfBruno.json). I have only this
document in the couchdb database.
My query is :
curl -XGET http://localhost:9200/rs/rs/_search?pretty=true -d '{
"query" : {
"query_string" :{"query" : "*"}
}
}'
My output is :
{
"took" : 94,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" :
}
}.
Could you help me please!!
Best regards
Rami Sellami.
--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
--
Cordialement,
Rami Sellami
--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
--
Cordialement,
Rami Sellami
--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs