[ https://issues.apache.org/jira/browse/SOLR-7525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15065536#comment-15065536 ]
Dennis Gove commented on SOLR-7525: ----------------------------------- Yes, you hit that right on the head. It was for consistency in the structure of Expressible classes. Also, currently it's implemented to return the first seen tuple in a group. However, I could see an enhancement where one could provide a selector to choose maybe the last seen, or the first based on some alternative order. For example, were someone to use the DistinctOperation in an expression it would currently look like this {code} distinct() {code} but I could also see it looking like one of these {code} distinct(first, sort="fieldA desc, fieldB desc") distinct(first, having="fieldA != null") {code} Essentially, although not currently supported it would be possible to expand the reducer operations to support complex selectors when a choice over which tuple to select is required. All that said, for now it's just for consistency. > Add ComplementStream to the Streaming API and Streaming Expressions > ------------------------------------------------------------------- > > Key: SOLR-7525 > URL: https://issues.apache.org/jira/browse/SOLR-7525 > Project: Solr > Issue Type: New Feature > Components: SolrJ > Reporter: Joel Bernstein > Priority: Minor > Attachments: SOLR-7525.patch, SOLR-7525.patch, SOLR-7525.patch > > > This ticket adds a ComplementStream to the Streaming API and Streaming > Expression language. > The ComplementStream will wrap two TupleStreams (StreamA, StreamB) and emit > Tuples from StreamA that are not in StreamB. > Streaming API Syntax: > {code} > ComplementStream cstream = new ComplementStream(streamA, streamB, comp); > {code} > Streaming Expression syntax: > {code} > complement(search(...), search(...), on(...)) > {code} > Internal implementation will rely on the ReducerStream. The ComplementStream > can be parallelized using the ParallelStream. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org