Hi, To eliminate any issues that might be happening due to curl, try running the command from your browser.
http://localhost:8988/solr/document2/stream?expr=search(document3,zkHost=" 127.0.0.1:2181",q="*:*",fl="document_id, sender_msg_dest", sort="document_id asc",qt="/export") I think most browsers will url encode the expression automatically, but you can url encode also using an online tool. Also you can remove the zkHost param and it should default to zkHost your solr is connected to. If you still get an error take a look at the logs and post the full stack trace to this thread, which will help determine where the problem is. Joel Bernstein http://joelsolr.blogspot.com/ On Sun, Jun 5, 2016 at 2:11 PM, Hui Liu <h...@opentext.com> wrote: > Hi, > > > > I have Solr 6.0.0 installed on my PC (windows 7), I was > experimenting with ‘Streaming Expression’ feature by following steps from > this link: > https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions, > but cannot get it to work, attached is my solrconfig.xml and schema.xml, > note I do have ‘export’ handler defined in my ‘solrconfig.xml’ and enabled > all fields as ‘docvalues’ in ‘schema.xml’; I am using solr cloud and > external zookeeper (also installed on m PC), here is the command to start > this 2-node Solr cloud instance and to create the collection ‘document3’: > > > > -- start 2-node solr cloud instances: > > solr start -c -z 127.0.0.1:2181 -p 8988 -s solr3 > > solr start -c -z 127.0.0.1:2181 -p 8989 -s solr4 > > > > -- create the collection: > > solr create -c document3 -d new_doc_configs3 -p 8988 -s 2 -rf 2 > > > > after creating the collection I loaded a few documents using > ‘csv’ format and I was able to query it using ‘curl’ command from my PC: > > > > -- this works on my PC: > > curl > http://localhost:8988/solr/document3/select?q=*:*&sort=document_id+desc,sender_msg_dest+desc&fl=document_id,sender_msg_dest,recip_msg_dest > > > > but when trying Streaming ‘search’ using curl, it does not > work, I tried with 3 different options: with zkHost, using ‘export’, or > using ‘select’, all getting the same error: > > > curl: (6) Could not resolve host: sort=document_id asc,qt= > > {"result-set":{"docs":[ > > {"EXCEPTION":null,"EOF":true}]}} > > -- different curl commands tried, all getting the same error above: > > curl --data-urlencode > 'expr=search(document3,zkHost="127.0.0.1:2181",q="*:*",fl="document_id, > sender_msg_dest", sort="document_id asc",qt="/export")' " > http://localhost:8988/solr/document2/stream" > > > > curl --data-urlencode 'expr=search(document3,q="*:*",fl="document_id, > sender_msg_dest", sort="document_id asc",qt="/export")' " > http://localhost:8988/solr/document2/stream" > > > > curl --data-urlencode 'expr=search(document3,q="*:*",fl="document_id, > sender_msg_dest", sort="document_id asc",qt="/select",rows=10)' " > http://localhost:8988/solr/document2/stream" > > > > what am I doing wrong? Thanks for any help! > > > > Regards, > > Hui Liu >