Thanks for responding, Yonik. I tried out your suggestion, and it seems to work as it is supposed to, and it performs at least as well as the "hacky implementation I did myself". Wish you had responded earlier. Or maybe not, then I wouldn't have dived into it myself making an implementation that does (almost) exactly what seems to be done when using your approach, and then I wouldn't have learned so much. But the great thing is that now I do not have to go suggest (or implement myself) this idea as a new Solr/Lucene feature - it is already there!

See http://solrlucene.blogspot.dk/2014/05/performance-of-and-queries-with-uneven.html. Hope you do not mind that I reference you and the link you pointed out.

Thanks a lot!

Regards, Per Steffensen

On 23/05/14 18:13, Yonik Seeley wrote:
On Fri, May 23, 2014 at 11:37 AM, Toke Eskildsen <t...@statsbiblioteket.dk> 
wrote:
Per Steffensen [st...@designware.dk] wrote:
* It IS more efficient to just use the index for the
"no_dlng_doc_ind_sto"-part of the request to get doc-ids that match that
part and then fetch timestamp-doc-values for those doc-ids to filter out
the docs that does not match the "timestamp_dlng_doc_ind_sto"-part of
the query.
Thank you for the follow up. It sounds rather special-case though, with 
requirement of DocValues for the range-field. Do you think this can be 
generalized?
Maybe it already is?
http://heliosearch.org/advanced-filter-caching-in-solr/

Something like this:
  &fq={!frange cache=false cost=150 v=timestampField l=beginTime u=endTime}


-Yonik
http://heliosearch.org - facet functions, subfacets, off-heap filters&fieldcache


Reply via email to