> I have a query that seems to be running much slower when i > try to filter it. > the field is of type pdate (solr.DateField) and the filter > is for example > timestamp:[2010-01-01T00:00:00Z TO NOW] (to look only for > documents since > Jan 1st. > if i don't use the filter, the query returns pretty fast, > but adding the > filter (either as a filter or as part of the query itself) > slows the query a lot.
It is expected. Timestamp (with milliseconds) field will produce a lot of unique terms. Probably it will be unique for all documents. To speed-up range queries: 1-) use tdate (solr.TrieDateField) 2-) use fq=timestamp:[2010-01-01T00:00:00Z TO NOW/MINUTE+1MINUTE] Idea of 2 comes from http://search-lucene.com/m/rj7LLb20Nl1/