Search no have any results

Hi I'm an 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/
2- http://hintdesk.com/how-to-connect-elasticsearch-to-ms-sql-server/
3- Moving data from SQL Server 2012 to ElasticSearch

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=هسل
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
What is wrong in my work?

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

As your mention I call this url : 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?

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?

What is your elasticsearch version?

it's elasticsearch-5.5.1.

AFAIK JDBC importer is not 5.x compatible

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