Try a new thread with 'dismax' and 'boosts' in the title. The Solr date features offer nice support in range queries and faceting. If you round the stored date to NOW/1SECOND and store it as a tdate, it won't use much more space than storing the seconds as a tint. ('t' stands for Trie, a compressed format for numbers.)
On 4/11/10, Shawn Heisey <s...@elyograg.org> wrote: > On 4/9/2010 7:35 PM, Lance Norskog wrote: >> 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. >> > > I hadn't figured out yet exactly what I wanted to do as far as the > actual boost value and what ranges to use. With our current indexing > solution (expensive), we don't use relevancy at all, we sort by > post_date, which is just an integer with seconds since epoch. In the > Solr replacement we are hurriedly trying to get into production, I am > indexing/storing it as a tlong, and I'm pretty sure it is required in > integer format by our application. If you can help me set up schema.xml > and DIH to index an additional field in a Solr Date format, then I think > I could use the range query you are suggesting, once I know how to > actually incorporate it. > > What I would like to do is find a way to use dismax to handle all this > automatically without requiring the application to do much beyond supply > the query text that the user typed in. The first iteration of code > they've come up with doesn't "AND" the terms together, so the results > were not what we expected. I found from the 1.4 solr book that dismax > can do a number of things to improve this situation. What I'd like to > do is have boost values for all the default fields, turn on query slop > and phrase slop, and have the post_date give newer documents a little > boost, exactly how much is yet to be determined because I don't have any > of this working yet. > > Should I open a new thread for help with the dismax requestHandler > config? I'm having trouble finding good examples, and what I've been > able to find so far just has me confused. > > Thanks, > Shawn > > -- Lance Norskog goks...@gmail.com