I have 2 node cluster 10.3.11.90(seed node running cassandra) and 10.3.11.91(running solr).....I loaded the CSV data using bulk loader in the cluster now I have to make available solr search on this data...what is the step??
Thanks!
I have 2 node cluster 10.3.11.90(seed node running cassandra) and 10.3.11.91(running solr).....I loaded the CSV data using bulk loader in the cluster now I have to make available solr search on this data...what is the step??
Thanks!
Posting solrconfig.xml and schema.xml is enough. You need to create schema.xml to provide appropriate mapping of your columns to Solr. Then it will just index existing data in Cassandra.
Sorry!! Could you pl. explain in detail.
Data I loaded in 10.3.11.90 node(cassandra running) and solr running in 10.3.11.91 node.
Data format is:
#UUID,ID,REG,AGE,SEX,HAZSUB,REPORT, CHEMICAL
550e8400-e29b-41d4-a716-446655440000,38083,12468880,0,0,21,19, chromium
:
:
Now if the user search for chemical name say chromium than all rows containing chromium should be displayed.....Also in which folder should I make solrconfig.xml and schema.xml??
Thanks!!
You should POST solrconfig.xml and schema.xml using HTTP to appropriate URLs:
http://localhost:8983/solr/resource/{keyspace}.{columnfamily}/solrconfig.xml
http://localhost:8983/solr/resource/{keyspace}.{columnfamily}/schema.xml
You can POST many times, it will just overwrite the previous content if present.
when I execute solr query inside cqlsh I get the following result below but no output??
cqlsh:wiki> select title from solr where solr_query='title:natio*';
Request did not complete within rpc_timeout.
That error message could indicate that something went wrong on the server side, can you check you system.log for exceptions?
Before posting I modified the solrconfig.xml (10.3.11.91 in place of localhost)
This is the error which I could see in system log:
ERROR [pool-2-thread-1] 2012-07-20 11:33:15,305 SolrException.java (line 114) org.apache.solr.common.SolrException: org.apache.solr.client.solrj.SolrServerException: java.net.ConnectException: Connection refused
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:284)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1460)
at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:59)
at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1237)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.solr.client.solrj.SolrServerException: java.net.ConnectException: Connection refused
Just to plain what I am doing:
I have 2 node cluster 10.3.11.90(bin/dse cassandra -t running) and 10.3.11.91(bin/dse cassandra -s -f) running than in 10.3.11.91...I modified solrconfig.xml (localhost to 10.3.11.91) and than I followed the step as per solr wikipedia demo....also when I point to http://10.3.11.91:8983/demos/wikipedia/ nothing lods in the right side....
bin/dsetool result:
[root@NJVC-BAO-DEV-DB-2 wiki]# /usr/local/datastax-2.1/dse-2.1/bin/dsetool ring -h 10.3.11.91
Address DC Rack Workload Status State Load Owns Token
85070591730234615865843651857942052864
10.3.11.90 DC1 RAC1 Analytics(JT) Up Normal 1.08 MB 50.00% 0
10.3.11.91 DC1 RAC2 Search Up Normal 9.66 MB 50.00% 85070591730234615865843651857942052864
Hmm, your search node is not in a separate DC. Therefore, if you have a replication factor = 1, only half of your data is placed on the search node. Probably because of a bug that was fixed in the 2.2 branch, the server tries to contact your analytics node to get the rest of the data and gets connection refused, because solr is not running there.
Put the two nodes into separate datacenters or eventually try RF=2 with your current config (but that might still not work - there is a strong assumption in DSE search that it needs to have a separate DC).
I updated my configuration to:
[root@NJVC-BAO-DEV-DB-2 wiki]# /usr/local/datastax-2.1/dse-2.1/bin/dsetool ring -h 10.3.11.91
Address DC Rack Workload Status State Load Owns Token
85070591730234615865843651857942052864
10.3.11.90 DC1 RAC1 Analytics(JT) Up Normal 1.08 MB 50.00% 0
10.3.11.91 DC2 RAC1 Search Up Normal 9.66 MB 50.00% 85070591730234615865843651857942052864
Now...when i post solrconfig.xml and schema.xml I get the following warning:
[root@NJVC-BAO-DEV-DB-2 wikipedia]# ./1-add-schema_test.sh
WARNING: "java.lang.RuntimeException: org.apache.solr.common.SolrException: Could not find: schema.xml"
Posted solrconfig_test.xml to http://10.3.11.91:8983/solr/resource/mappingtest.chemicalstest/solrconfig_test.xml
WARNING: "java.lang.RuntimeException: org.apache.solr.common.SolrException: Could not find: schema.xml"
Posted schema_test.xml to http://10.3.11.91:8983/solr/resource/mappingtest.chemicalstest/schema_test.xml
You must log in to post.