Yonik, thanks for your explanation. I've created a ticket here https://issues.apache.org/jira/browse/SOLR-3104
On Mon, Feb 6, 2012 at 4:28 PM, Yonik Seeley <yo...@lucidimagination.com>wrote: > On Mon, Feb 6, 2012 at 6:16 PM, XJ <oleol...@gmail.com> wrote: > > Sorry I didn't make this clear. Yeah we use dismax in main query, as > well as > > in sort orders (different from main queries). Because of our complicated > > business logic, we need many different relevancy queries in different > sort > > orders (other than sort by score, we also have around 20 other different > > sort orders, some of them are dismax queries). However, this is > something we > > can not get away from right now. What kind of optimization I can try to > do > > there? > > OK, so basically it's slow because functions with embedded relevancy > queries are "forward only" - if you request the value for a docid > previous to the last, we need to reboot the query (re-weight, ask for > the scorer, etc). This means that for your 30 documents, that will > require rebooting the query about 15 times (assuming that roughly half > of the time the next docid will be less than the previous one). > > Unfortunately there's not much you can do externally... we need to > implement optimizations at the Solr level for this. > Can you open a JIRA issue for this? > > -Yonik > lucidimagination.com >