[ 
https://issues.apache.org/jira/browse/SOLR-8996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15273569#comment-15273569
 ] 

Dennis Gove commented on SOLR-8996:
-----------------------------------

Valid question and I did give that some thought. 

Because this is testing randomness, I can't think of a way to make it pass 100% 
of the time. There is still a probability (much much much smaller now) that two 
RandomStreams will return the documents in the same order. By increasing the # 
of documents that probability has become an effective 'never gonna happen' 
(until it does, of course).

Assuming the random field type is truly random this works out to 1000! possible 
distinct list of tuples (because tuple order matters in the test) and the 
probability of the two streams in the test resulting in the same order is 
infinitesimally small. That said, technically it's not impossible so an updated 
message might be worthwhile.

> Add Random Streaming Expression
> -------------------------------
>
>                 Key: SOLR-8996
>                 URL: https://issues.apache.org/jira/browse/SOLR-8996
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Joel Bernstein
>            Assignee: Joel Bernstein
>             Fix For: 6.1
>
>         Attachments: RandomStream.java, 
> SOLR-8996-decrease-failure-probability.patch, SOLR-8996.patch
>
>
> The random Streaming Expression will return a *limited* random stream of 
> Tuples that match a query. This will be useful in many different scenarios 
> where random data sets are needed.
> Proposed syntax:
> {code}
> random(baskets, q="productID:productX", rows="100", fl="basketID") 
> {code}
> The sample code above will query the *baskets* collection and return 100 
> random *basketID's* where the productID is productX.
> The underlying implementation will rely on Solr's random field type.



--
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

Reply via email to