Normal Query on Cassandra using DataStax Enterprise works, but not solr_query

依然范特西╮ 提交于 2019-12-08 05:20:59

问题


I am having a strange issue occur while utilizing the solr_query handler to make queries in Cassandra on my terminal.

When I perform normal queries on my table, I am having no issues, but when I use solr_query I get the following error:

Unable to complete request: one or more nodes were unavailable.

Other individuals who have experienced this problem seem unable to do any queries on their data whatsoever, whether or not it is solr_query. My problem only persists while using that handler.

Can anyone give me a suggestion for what the issue may be with my solr node.

ALSO -- I can do queries off of the Solr Admin page but like I said, am unable to do so on a terminal within my macbook.....

Here is the query I used, for reference:

cqlsh:demo> select * from device WHERE solr_query='id:[1 to 10000000000}';

More info:

This is how I created my KEYSPACE:

CREATE KEYSPACE demo WITH REPLICATION = {'class':'NetworkTopologyStrategy', 'Solr':1};

This is how I created the Solr core:

bin/dsetool create_core demo.device generateResources=true reindex=true

Performed a nodetool ring -h on my localhost and got this back:

Datacenter: Solr

Address Rack Status State Load Owns Token

127.0.0.1 rack1 Up Normal 2.8 MB 100.00% -673443545391973027

So it appears my node is up and normal..... Which leads me to believe it is an issue with the actual solr_query handler.

I also found the requestHandler within my config file


回答1:


Your query isn't probably correct: id:[1 to 10000000000}

The "unavailable nodes" error is unfortunately a red herring, as that's the way Thrift (which cqlsh in Cassandra 2.0 is based upon) translates given errors, while you should get a more meaningful error if you repeat the same query with a driver based on the native protocol.



来源:https://stackoverflow.com/questions/27966440/normal-query-on-cassandra-using-datastax-enterprise-works-but-not-solr-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!