Searching data

Trying out Elasticsearch for possible use in our projects.

I got through the installation and went down the route of using the jdbc river so that I can just quickly create some indexes to see how things will work.

I created the river with the following:

{

"type":"jdbc",

"schedule" : "0 0-59 0-23 ? * *",

"jdbc": {

"driver":"com.microsoft.sqlserver.jdbc.SQLServerDriver",

"url":"jdbc:sqlserver://127.0.0.1;databaseName=mydatabase",

"user":"myusername","password":"mypassword",

"sql":"select * from dbo.mytableorview",

"index":"myindexname",

"type":"mytypename"

}

That seemed to go ok. I then sent

http://localhost:9200/_count?pretty' -d '

and the results are:

{
"count": 57164,
"_shards": {
"total": 8,
"successful": 8,
"failed": 0
}
}

OK, so it seems like some documents were imported via the river.

Now I'm trying to search anything using Sense and the following command:

GET myindexname/mytypename/_search

and I receive:

{
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}

can anyone shed some light on where I'm going wrong?

Thanks