From: Demian K. <dem...@vi...> - 2014-01-10 13:16:35
|
You might have to copyField the string year to an int field in order to do integer-based boosting (not sure what happens if you just use the string, but I couldn't find a function to cast string to int). Once you have the integer value, you can use any of the math functions to scale the value to the appropriate boost value. If you do indeed need the more granular dates, you may have to do more work at index-time to format the values properly, but this probably wouldn't be terribly difficult -- just a matter of a BeanShell script to default missing elements of the date string to proper values. I'm also far from an expert on Solr boosting, so if this isn't helpful, it may be worth repeating the question on the solr-user list -- somebody there may have a better solution. - Demian ________________________________________ From: Lassila Matti [mat...@jy...] Sent: Friday, January 10, 2014 3:58 AM To: Demian Katz Cc: vuf...@li... Subject: Re: [VuFind-General] Date-based boosting using TrieDateFields and bf statement in searchspecs.yaml On 1/9/14 16:28 , "Demian Katz" <dem...@vi...> wrote: >If you're just working with publication years, is it possible that you >can do a much simpler boost function, since you can treat the year as an >integer without having to worry about date functions at all? Currently only year-based boosting is required, but later it might be that we encounter a use case where more fine-grained date-based boosting gives better results. It seems that earlier before TrieDateFields came available date-based boosting had to be implemented using rord()-function which is warned to be excessively hungry for memory. Is there other options to implement boosting (e.g.. without ms() and rord()), using integer value of year saved as string instead of nowadays recommended ms()-based method? >Let me know if you'd like me to do deeper research into this. Thanks, if you have possibility to do so :) Regards, Matti L |