Jonathan Nightingale created SOLR-14508:
-------------------------------------------

             Summary: TopicStreams do not allow use of collection aliases
                 Key: SOLR-14508
                 URL: https://issues.apache.org/jira/browse/SOLR-14508
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrJ
    Affects Versions: 8.1, 7.4
            Reporter: Jonathan Nightingale


I'm trying to use the solrJ TopicStream class to listen for data in a 
collection by referencing its alias. It complains about there not being any 
slices for that alias. On investigation it looked like the code in solrj was 
explicitly NOT looking at aliases in topic stream.

 

I made some minor changes and rebuilt and it seems to work.

 

in two places where getSlices is called, I set the useAlias flag to true

 
protected void constructStreams() throws IOException {
    try {
      ZkStateReader zkStateReader = cloudSolrClient.getZkStateReader();
      Slice[] slices = CloudSolrStream.getSlices(this.collection, 
zkStateReader, *true*);
 
and also here
 
private void getCheckpoints() throws IOException {
    this.checkpoints = new HashMap<>();
    ZkStateReader zkStateReader = cloudSolrClient.getZkStateReader();

    Slice[] slices = CloudSolrStream.getSlices(this.collection, zkStateReader, 
*true*);
 
I don't know how many versions this affects but I'm sure its a bunch. Also I 
hit the same errors using the REST api as I did using Solrj, so this would 
probably not affect that



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to