Is the streaming API still supported?
Or does it just not support sharded solr cloud collections?

I tried following both of these posts:
If I follow this post 
http://joelsolr.blogspot.com/2015/04/the-streaming-api-solrjio-basics.html  I 
get a null pointer doing exactly what was done here


If I follow this post 
https://lucidworks.com/post/streaming-expressions-in-solrj/    Nothing happens

Streaming could be useful if it worked and was properly documented.


-----Original Message-----
From: Webster Homer <[email protected]>
Sent: Tuesday, September 28, 2021 4:55 PM
To: [email protected]
Subject: Null pointer exception in simple streaming call

[WARNING - EXTERNAL EMAIL] Do not open links or attachments unless you 
recognize the sender of this email. If you are unsure please click the button 
"Report suspicious email"


I am trying to use the streaming API to output a file from one of our solrcloud 
collections. It seems like this should be simple but it keeps throwing an 
exception.
I tried to use the Solrconsole UI and got farther than with Java or CURL. In 
the console if I give it a query with a limited result set it worked alright, 
but times out with a larger set.

I am running Solr 7.7.3 is solrcloud mode. The collection has 2 shards with 2 
replicas per shard. Normally we just use the normal solr search, but I needed 
to dump out all the rows with some filtering applied This is my CURL command

curl --data-urlencode  
'expr=search(qt="/export",q="*:*",fl="display_material_number,display_pno,key_brand",sort="display_pno
 asc",fq="searchmv_sales_org:(2106 OR 7950 OR 0)", 
fq="-key_product_status:(INTERNAL OR WITHDRAWN)", 
fq="-facet_country_exclusions:US")
' http://localhost:8983/solr/sial-catalog-material/stream


This is the response:
./stream_materials.sh
{
  "result-set":{
    "docs":[{
        "EXCEPTION":null,
        "EOF":true}]}}

When I created a Java program it gave me this stack trace:
Exception in thread "main" java.io.IOException: java.lang.NullPointerException
              at 
org.apache.solr.client.solrj.io.stream.CloudSolrStream.constructStreams(CloudSolrStream.java:389)
              at 
org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(CloudSolrStream.java:278)
              at 
com.sial.solrcloud.streams.SialStreamingMaterials.main(SialStreamingMaterials.java:46)
Caused by: java.lang.NullPointerException
              at 
org.apache.solr.client.solrj.io.stream.TupleStream.getShards(TupleStream.java:133)
              at 
org.apache.solr.client.solrj.io.stream.CloudSolrStream.constructStreams(CloudSolrStream.java:374)
              ... 2 more

TupleStream.java line number 133 is:
CloudSolrClient cloudSolrClient = 
streamContext.getSolrClientCache().getCloudSolrClient(zkHost);

In the Solr Console if I change the q parameter to be 
q="search_material:T1503*" I get some results so I think the expression is 
close to what I want. I just  want all the rows that satisfy the filter queries.

I don't even know where to look. Any help would be welcome.





This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient, you 
must not copy this message or attachment or disclose the contents to any other 
person. If you have received this transmission in error, please notify the 
sender immediately and delete the message and any attachment from your system. 
Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept 
liability for any omissions or errors in this message which may arise as a 
result of E-Mail-transmission or for damages resulting from any unauthorized 
changes of the content of this message and any attachment thereto. Merck KGaA, 
Darmstadt, Germany and any of its subsidiaries do not guarantee that this 
message is free of viruses and does not accept liability for any damages caused 
by any virus transmitted therewith.



Click 
merckgroup.com/disclaimer<https://www.merckgroup.com/en/legal-disclaimer/mail-disclaimer.html>
 to access the German, French, Spanish, Portuguese, Turkish, Polish and Slovak 
versions of this disclaimer.



Please find our Privacy Statement information by clicking here 
merckgroup.com/en/privacy-statement.html<https://www.merckgroup.com/en/privacy-statement.html>


This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient, you 
must not copy this message or attachment or disclose the contents to any other 
person. If you have received this transmission in error, please notify the 
sender immediately and delete the message and any attachment from your system. 
Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept 
liability for any omissions or errors in this message which may arise as a 
result of E-Mail-transmission or for damages resulting from any unauthorized 
changes of the content of this message and any attachment thereto. Merck KGaA, 
Darmstadt, Germany and any of its subsidiaries do not guarantee that this 
message is free of viruses and does not accept liability for any damages caused 
by any virus transmitted therewith.



Click 
merckgroup.com/disclaimer<https://www.merckgroup.com/en/legal-disclaimer/mail-disclaimer.html>
 to access the German, French, Spanish, Portuguese, Turkish, Polish and Slovak 
versions of this disclaimer.



Please find our Privacy Statement information by clicking here 
merckgroup.com/en/privacy-statement.html<https://www.merckgroup.com/en/privacy-statement.html>

Reply via email to