[ https://issues.apache.org/jira/browse/SOLR-534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832333#action_12832333 ]
Hoss Man commented on SOLR-534: ------------------------------- bq. But if you use the REALLY_BIG_NUMBER approach, the same bad programmer who never thought he would get back more than a 1000 records will never check whether the result set contains more than 1000 records either. If we're going to assume the programmer doesn't check the actual number found, then why assume that the programmer pays attention to anything in the response at all? If you think it's likley that programmers will write code that only looks at the docList to iterates over all the docs in a response and doesn't notice that the numFound at the top of the docList is higher then the number asked for. then why do you assume that same programmer would be smart enough to check if an error message is returned when they ask for "all" rows and Solr can't provide them? Bottom line: we can't protect programmers from all possible forms of stupidity stupidity, but we can make them be explicit about exactly what they want -- if they want 100, they ask for 100; if they want 10000 they ask for 10000, if they want "all" they have to specify how big they think "all" is. bq. Solr sure as heck better be checking this already--you never know when you'll run into bizarre low memory conditions;allocations should ALWAYS be checked for. This isn't as easy as it may sound in Java ... the APIS available to test for the amount of memory available are limited, and even if hte JVM has the resources to allocate a 10,000,000 item PiorityQuery when computing the results, that doesn't mean doing so won't eat up all the available RAM causing some later (extremely tiny) allocation to trigger an OOM --- but If you've got a suggestion to help prevent OOM in situations like this, by all means patches welcome. > Return all query results with parameter rows=-1 > ----------------------------------------------- > > Key: SOLR-534 > URL: https://issues.apache.org/jira/browse/SOLR-534 > Project: Solr > Issue Type: New Feature > Components: search > Affects Versions: 1.3 > Environment: Tomcat 5.5 > Reporter: Lars Kotthoff > Priority: Minor > Attachments: solr-all-results.patch > > > The searcher should return all results matching a query when the parameter > rows=-1 is given. > I know that it is a bad idea to do this in general, but as it explicitly > requires a special parameter, people using this feature will be aware of what > they are doing. The main use case for this feature is probably debugging, but > in some cases one might actually need to retrieve all results because they > e.g. are to be merged with results from different sources. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.