Hi Folks, Has anyone had a chance to consider this question yet?
Thanks! Stephen On Tue, Mar 3, 2020 at 2:28 PM Stephen Lewis Bianamara < stephen.bianam...@gmail.com> wrote: > Hi SOLR Community, > > I've observed while hosting a SOLR 6.6 installation that if I issue a > query where the filter query returns an empty set but there is a sort > associated with it, the query takes an extended time to execute over the > query with only the filter query and no sort associated to it. This > suggests to me that SOLR is sorting in parallel with or even before the > filter query. However, it seems to me like the query should generally > filter first and then sort, or perhaps have an option to do so. I don't > currently see any way of making that happen. > > What motivates my question today is that the sort being used is typically > quite expensive if applied to all documents in a shard or cluster, but it > seems to me that the filter should precede the sort for exactly this reason. > > So my questions for the community: > > - Am I correct that the sort happens even when the filter query result > is empty? > - Is it possible to achieve the desired behavior of only sorting on > results of the filter? > - Is this behavior changed in any later versions of SOLR? > - If none of these are so, is there a Jira issue tracking this > capability? > > Thanks! > Stephen >