Right. Regular filter is executed and cached (if it's a case) first, then query is executed, and post-filter is checked by every doc found.
On Thu, Dec 19, 2024 at 7:42 AM ufuk yılmaz <uyil...@vivaldi.net.invalid> wrote: > Hello Zhao-san > > Take a look at the cache and cost local parameters here: > https://solr.apache.org/guide/solr/latest/query-guide/common-query-parameters.html#cache-local-parameter > > If a filter query is not cached and it is very expensive, it is possible > to tell Solr to execute it after all other q and fq using the above params. > Otherwise I don’t exactly know in what order they are executed but my guess > is they are all executed in parallel and later an intersection or union is > made on their results. > > -ufuk > > — > > > On Dec 19, 2024, at 10:51, Mingchun Zhao <mingchun.zha...@gmail.com> > wrote: > > > > Hi, > > > > When a search query includes both q and fq parameters, which one is > > executed first internally (in Solr or Lucene)? > > Additionally, is it possible to change this execution order? > > > > Regards, > > Mingchun > -- Sincerely yours Mikhail Khludnev