Amrit Sarkar created SOLR-12658:

             Summary: Extend support for more than 4 "partitionKeys" in 
ParallelStream after SOLR-11598
                 Key: SOLR-12658
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
          Components: streaming expressions
            Reporter: Amrit Sarkar

SOLR-11598 extended the capabilities for Export handler to have more than 4 
fields for sorting.

As streaming expressions leverages Export handler, ParallelStream allowed 
maximum 4 fields in "{color:blue}partitionKeys{color}" and silently ignored 
rest of the fields if more than 4 are specified.

 HashQParserPlugin:CompositeHash: 347
  private static class CompositeHash implements HashKey {

    private HashKey key1;
    private HashKey key2;
    private HashKey key3;
    private HashKey key4;

    public CompositeHash(HashKey[] hashKeys) {
      key1 = hashKeys[0];
      key2 = hashKeys[1];
      key3 = (hashKeys.length > 2) ? hashKeys[2] : new ZeroHash();
      key4 = (hashKeys.length > 3) ? hashKeys[3] : new ZeroHash();

    public void setNextReader(LeafReaderContext context) throws IOException {

    public long hashCode(int doc) throws IOException {

To make sure we have documents distributed across workers when executing 
streaming expression parallely, all the fields specified in 'partitionKeys' 
should be considered in calculating which worker particular document should go 
for further processing.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to