Hi Ufuk, Thank you very much for your response!
> 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. I will try testing whether the execution order of the fq parameter can be changed using the cost local parameter. > 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. I tried to check the execution order of the q's main query and the fq's filter query by checking the source code of Solr and Lucene, but I couldn't find the relevant part. If anyone has any hints, I would greatly appreciate it. Regards, Mingchun 2024年12月19日(木) 13:42 ufuk yılmaz <uyil...@vivaldi.net.invalid>: > 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 >