On 7/25/07, Luis Neves <[EMAIL PROTECTED]> wrote:
Luis Neves wrote:

> The objective is to boost the documents by "freshness" ...  this is
> probably the cause of the memory abuse since all the "EntryDate" values
> are unique.
> I will try to use something like:
> <str name="bq">EntryDate:[* TO NOW/DAY-3MONTH]^1.5</str>

This turn out to be a bad idea ... for some reason using the BoostQuery instead
of the BoostFunction slows the search to a crawl.

Dismax throws bq in with the main query, so it can't really be cached
separately, so iterating over the number of terms in [* TO
NOW/DAY-3MONTH] for each query is expensive.

You could try lowering the resolution of EntryDate to lower the number
of unique terms (but that would require reindexing).  That would speed
up a range query, or lower the memory usage of the FieldCache entry.

Solr could also somehow be smarter about the FieldCache and only cache
the ordinal and not the actual values (this could apply to sorting
too).  Lucene's FieldCache doesn't currently support that though, so
it would require some hacking.

If you didn't want date math, date faceting, or date ranges, you could
simply store a date as  a classic integer (number of seconds since
epoch).  function queries would still work on this, and the FieldCache
would be 4 bytes per doc.

-Yonik

Reply via email to