Not seeing search results

Hi, I installed elasticsearch 2.3.3 and have created an index by pumping the data from my sql server DB. But when I issued a search query from browser, I don't see the results. Instead I see the following.

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

Am I missing anything? It says "successful: 5". But I want to see the actual documents resulting in that search. How do I see them?

Highly appreciate the help.

Thanks.

It means that you did not index everything apparently.

Hard to say why but my guess is that you need to look at your ingest layer.

Thanks for response @dadoonet. But, how can I validate if my index is good.

I connected to SQL server using JDBC and pulled the data into elastic using a "select *" command from a table.

When I restarted elasticsearch, it shows the below on the screen:

][INFO ][node ] [Starhawk] started
[INFO ][cluster.routing.allocation] [Starhawk] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[my-indexname][4]] ...]).

Hi All,

Still have the same issue. Appreciate any thoughts / insights. Basically, how do I validate the data from jdbc has been successfully written into indexes?

Thanks a lot in advance!

this relates to the number of shards that are searched in total, and how many were successful and failed.

this relates to the total number of hits that matched the search query.

Agree with @dadoonet, I'd investigate your indexing process as it looks like it isn't indexing documents, at least not into the indices that your search query is running against.

Thanks a lot @forloop

I am using elastic 2.3.3 with jdbc 2.3.3.1 to pull data from SQL Server into elastic.

The jdbc logs are clear. They dont show any error. In fact, it has just 6 or 7 lines (highlights being, connected to SQL Source successfully and the last line being successfully connected to elastic 9300 port.

Do we normally any more log lines saying data is pumped into indexes? If yes, I dont see them.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.