# Search no have any results

**URL:** <https://discuss.elastic.co/t/search-no-have-any-results/95645>\
**Category:** Elasticsearch\
**Created:** [August 3, 2017, 6:31am UTC](https://discuss.elastic.co/t/search-no-have-any-results/95645 "2017-08-03T06:31:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![parsa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/parsa/32/23227_2.png) [@parsa](https://discuss.elastic.co/u/parsa)\
**Post date:** [August 3, 2017, 6:31am UTC](https://discuss.elastic.co/t/search-no-have-any-results/95645/1 "2017-08-03T06:31:12Z")

</div>

Hi I'm an [asp.net](http://asp.net) developer and I want to implement elastic search in windows.  
I installed and configured the elasticsearch serivice like as described in this articles:

1- [http://caraulean.com/2016/install-and-configure-elasticsearch-in-windows/](http://caraulean.com/2016/install-and-configure-elasticsearch-in-windows/)  
2- [http://hintdesk.com/how-to-connect-elasticsearch-to-ms-sql-server/](http://hintdesk.com/how-to-connect-elasticsearch-to-ms-sql-server/)  
3- [Moving data from SQL Server 2012 to ElasticSearch](https://discuss.elastic.co/t/moving-data-from-sql-server-2012-to-elasticsearch/70683)

Here is my statefile.json as the third article:  
`{ "type": "jdbc", "jdbc": { "url": "jdbc:sqlserver://ServerIp:1433;databaseName=dbName", "user": "ElasticSearch", "password": "Password", "sql": "SELECT * FROM dbo.MainPageForbiddenChannels", "treat_binary_as_string": true, "elasticsearch": { "cluster": "elasticsearch", "host": "localhost", "port": 9200, "index": "record", "type": "record" } } }`  
There are some results in of my work:  
First :  
the result of this url : [http://localhost:9200/\_search?q=هسل](http://localhost:9200/_search?q=%D9%87%D8%B3%D9%84)  
is  
`{"took":0,"timed_out":false,"_shards":{"total":0,"successful":0,"failed":0},"hits":{"total":0,"max_score":0.0,"hits":[]}}`  
Second :  
is  
[jdbc.log](https://www.dropbox.com/s/3b9jfeiqlrer7aw/jdbc.log?dl=0)  
What is wrong in my work?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 4, 2017, 7:16am UTC](https://discuss.elastic.co/t/search-no-have-any-results/95645/2 "2017-08-04T07:16:19Z")

</div>

Hey,

can you confirm, that any data has been indexed before checking that a query does not yield any results? You can run `GET record/_count` to check the number of documents.

This way you know if your ingestion is not working or your query...

--Alex

---

<div class="post-metadata">

**Author:** ![parsa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/parsa/32/23227_2.png) [@parsa](https://discuss.elastic.co/u/parsa)\
**Post date:** [August 6, 2017, 4:51am UTC](https://discuss.elastic.co/t/search-no-have-any-results/95645/3 "2017-08-06T04:51:10Z")

</div>

As your mention I call this url : [http://localhost:9200/record/\_count](http://localhost:9200/record/_count)  
and the result is :  
`{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"record","index_uuid":"_na_","index":"record"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"record","index_uuid":"_na_","index":"record"},"status":404}`  
What I should be do?

---

<div class="post-metadata">

**Author:** ![parsa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/parsa/32/23227_2.png) [@parsa](https://discuss.elastic.co/u/parsa)\
**Post date:** [August 6, 2017, 11:02am UTC](https://discuss.elastic.co/t/search-no-have-any-results/95645/4 "2017-08-06T11:02:51Z")

</div>

this is my jdbc.log:  
`[15:17:20,766][INFO][importer.jdbc][pool-2-thread-1] strategy standard: settings = {elasticsearch.cluster=elasticsearch, elasticsearch.host=localhost, elasticsearch.index=record, elasticsearch.port=9200, elasticsearch.type=record, password=password, sql=SELECT * FROM Video, treat_binary_as_string=true, url=jdbc:sqlserver://serverip:1433;databaseName=dbName, user=ElasticSearch}, context = org.xbib.elasticsearch.jdbc.strategy.standard.StandardContext@14c66f6e [15:17:20,778][INFO][importer.jdbc.context.standard][pool-2-thread-1] found sink class org.xbib.elasticsearch.jdbc.strategy.standard.StandardSink@3248931b [15:17:20,785][INFO][importer.jdbc.context.standard][pool-2-thread-1] found source class org.xbib.elasticsearch.jdbc.strategy.standard.StandardSource@209d758f [15:17:20,834][INFO][org.xbib.elasticsearch.helper.client.BaseTransportClient][pool-2-thread-1] creating transport client on Windows 8.1 Java HotSpot(TM) 64-Bit Server VM Oracle Corporation 1.8.0_45-b15 25.45-b02 with effective settings {autodiscover=false, client.transport.ignore_cluster_name=false, client.transport.nodes_sampler_interval=5s, client.transport.ping_timeout=5s, cluster.name=elasticsearch, flush_interval=5s, host.0=localhost, max_actions_per_request=10000, max_concurrent_requests=8, max_volume_per_request=10mb, name=importer, port=9200, sniff=false} [15:17:20,869][INFO][org.elasticsearch.plugins][pool-2-thread-1] [importer] modules [], plugins [helper], sites [] [15:17:21,495][INFO][org.xbib.elasticsearch.helper.client.BaseTransportClient][pool-2-thread-1] trying to connect to [localhost/127.0.0.1:9200] [15:17:26,566][INFO][org.elasticsearch.org.xbib.elasticsearch.helper.client.TransportClient][pool-2-thread-1] [importer] failed to get node info for {#transport#-1}{127.0.0.1}{localhost/127.0.0.1:9200}, disconnecting... org.elasticsearch.transport.ReceiveTimeoutTransportException: [][localhost/127.0.0.1:9200][cluster:monitor/nodes/liveness] request_id [0] timed out after [5001ms] at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:679) ~[elasticsearch-2.3.4.jar:2.3.4] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_45] at java.lang.Thread.run(Unknown Source) [?:1.8.0_45] [15:17:26,613][ERROR][importer.jdbc][pool-2-thread-1] error while processing request: no cluster nodes available, check settings {autodiscover=false, client.transport.ignore_cluster_name=false, client.transport.nodes_sampler_interval=5s, client.transport.ping_timeout=5s, cluster.name=elasticsearch, flush_interval=5s, host.0=localhost, max_actions_per_request=10000, max_concurrent_requests=8, max_volume_per_request=10mb, name=importer, port=9200, sniff=false} org.elasticsearch.client.transport.NoNodeAvailableException: no cluster nodes available, check settings {autodiscover=false, client.transport.ignore_cluster_name=false, client.transport.nodes_sampler_interval=5s, client.transport.ping_timeout=5s, cluster.name=elasticsearch, flush_interval=5s, host.0=localhost, max_actions_per_request=10000, max_concurrent_requests=8, max_volume_per_request=10mb, name=importer, port=9200, sniff=false} at org.xbib.elasticsearch.helper.client.BulkTransportClient.init(BulkTransportClient.java:164) ~[elasticsearch-helper-2.3.4.0.jar:?] at org.xbib.elasticsearch.helper.client.ClientBuilder.toBulkTransportClient(ClientBuilder.java:113) ~[elasticsearch-helper-2.3.4.0.jar:?] at org.xbib.elasticsearch.jdbc.strategy.standard.StandardSink.createClient(StandardSink.java:348) ~[elasticsearch-jdbc-2.3.4.1.jar:?] at org.xbib.elasticsearch.jdbc.strategy.standard.StandardSink.beforeFetch(StandardSink.java:100) ~[elasticsearch-jdbc-2.3.4.1.jar:?] at org.xbib.elasticsearch.jdbc.strategy.standard.StandardContext.beforeFetch(StandardContext.java:183) ~[elasticsearch-jdbc-2.3.4.1.jar:?] at org.xbib.elasticsearch.jdbc.strategy.standard.StandardContext.execute(StandardContext.java:164) ~[elasticsearch-jdbc-2.3.4.1.jar:?] at org.xbib.tools.JDBCImporter.process(JDBCImporter.java:203) ~[elasticsearch-jdbc-2.3.4.1.jar:?] at org.xbib.tools.JDBCImporter.newRequest(JDBCImporter.java:189) [elasticsearch-jdbc-2.3.4.1.jar:?] at org.xbib.tools.JDBCImporter.newRequest(JDBCImporter.java:53) [elasticsearch-jdbc-2.3.4.1.jar:?] at org.xbib.pipeline.AbstractPipeline.call(AbstractPipeline.java:50) [elasticsearch-jdbc-2.3.4.1.jar:?] at org.xbib.pipeline.AbstractPipeline.call(AbstractPipeline.java:16) [elasticsearch-jdbc-2.3.4.1.jar:?] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_45] at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]`

Is there any steps that I don't do that?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 6, 2017, 11:24am UTC](https://discuss.elastic.co/t/search-no-have-any-results/95645/5 "2017-08-06T11:24:35Z")

</div>

What is your elasticsearch version?

---

<div class="post-metadata">

**Author:** ![parsa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/parsa/32/23227_2.png) [@parsa](https://discuss.elastic.co/u/parsa)\
**Post date:** [August 6, 2017, 11:30am UTC](https://discuss.elastic.co/t/search-no-have-any-results/95645/6 "2017-08-06T11:30:11Z")

</div>

it's elasticsearch-5.5.1.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 6, 2017, 1:38pm UTC](https://discuss.elastic.co/t/search-no-have-any-results/95645/7 "2017-08-06T13:38:28Z")

</div>

AFAIK JDBC importer is not 5.x compatible

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 3, 2017, 1:38pm UTC](https://discuss.elastic.co/t/search-no-have-any-results/95645/8 "2017-09-03T13:38:29Z")

</div>

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