I know about numFound. That's where the issue is. On a complex query that takes mins I think there would be a major chunk of that spent in calculating "numFound" whereas I don't need it. Let's say I just need first 100 docs and then want SOLR to STOP looking further to populate the "numFound".
Let's say I just don't want SOLR to return me numFound. Is that possible? Also would it really help on the performance? In MySQL you can simply stop it to look further a certain count for "total count" and that gives a considerable improvement for complex queries but that's not an inverted index so not sure how it works in SOLR... On Fri, Mar 7, 2014 at 3:17 PM, Gora Mohanty <g...@mimirtech.com> wrote: > On 7 March 2014 15:18, Salman Akram <salman.ak...@northbaysolutions.net> > wrote: > > All, > > > > Is it possible to get partial counts in SOLR? The idea is to get the > count > > but if its above a certain limit than just return that limit. > > > > Reason: In an index with millions of documents I don't want to know that > a > > certain query matched 1 million docs (of course it will take time to > > calculate that). Why don't just stop looking for more results lets say > > after it finds 100 docs? Possible?? > > > > e.g. Something similar that we can do in MySQL: > > > > SELECT COUNT(*) FROM ( (SELECT * FROM table where 1 = 1) LIMIT 100) Alias > > The response to the /select Solr URL has a "numFound" attribute that > is the number > of matches. > > Regards, > Gora > -- Regards, Salman Akram