The example function seems to round time to years, so you're boosting by year?

Your dates are stored as UTC 64-bit longs counting the number of
milliseconds since Jan 1, 1970. That's it. They're in milliseconds
whether you supplied them that way or not. So I think the example is
what you want.

Function queries are notoriously slow. Another way to boost by year is
with range queries:
[NOW-6MONTHS TO NOW]^5.0 ,
[NOW-1YEARS TO NOW-6MONTHS]^3.0
[NOW-2YEARS TO NOW-1YEARS]^2.0
[* TO NOW-2YEARS]^1.0

Notice that you get to have a non-linear curve when you select the
ranges by hand.

On Fri, Apr 9, 2010 at 4:32 PM, Shawn Heisey <s...@elyograg.org> wrote:
> I've been trying to work out how SOLR thinks about dates internally so I can
> boost newer documents.  My post_date field is stored as seconds since the
> epoch, so I think the following is probably what I want.  I used 3.17
> instead of the 3.16 in all the examples because my own math suggests that's
> a more accurate number:
>
> recip(ms(NOW,product(post_date,1000)),3.17e-11,1,1)
>
> Reading the solr 1.4 book, I am not very clear on how to configure qf, bf,
> and pf in the dismax requestHandler, specifically in regards to using the
> function above in conjunction with the field-based boosts that I want to
> try.  Is there a place I can go to find some better examples, and find out
> what all the other fields in the example config do, such as mm?
>
> Thanks,
> Shawn
>
>



-- 
Lance Norskog
goks...@gmail.com

Reply via email to