On Dec 6, 2011, at 14:12 , Lukas Kahwe Smith wrote: > > On Dec 6, 2011, at 13:58 , Jukka Zitting wrote: > >> Hi, >> >> >> On Tue, Dec 6, 2011 at 10:27 AM, Christian Stocker >> <[email protected]> wrote: >>> Before we dig more into this: Would this be the correct way? Is this >>> even possible in Jackrabbit without having to change too much? Or is >>> there an easier way to give "newer" Documents more weight than >>> older once? >> >> I guess you could achieve the same effect by having a custom indexing >> configuration file [1] that you modify once per day or per week to >> increase the boost for specific node types. >> >> However, it seems counterintuitive to have to keep increasing the >> boost either with configuration changes or with a boost function like >> the one you proposed. > > yes .. this needs to be a boost that is determined at query time and not at > index time > >> As already suggested by Alex, I'd rather use sorting for this. To >> allow the full text match score to affect the sort order you could use >> just the year, month or week number as the first sort term and let the >> matches within that time period be sorted according to the match >> score. > > well sorting by date isnt a good solution at all if you actually also care > about the score. this is basically reducing lucene to an RDBMS LIKE engine.
i guess for now the best solution is to do one query with a date range of say 1-2 weeks and then doing a second query for the time after that range each sorting by score. since Jackrabbit currently doesnt leverage Lucene for date range queries, i guess we will then need to use a string field with the date and do an OR for the exact dates. regards, Lukas Kahwe Smith [email protected]
