Weighting recent results

Alex Aminoff aminoff at nber.org
Mon May 16 17:35:53 BST 2016


I was thinking about this some more: Is there a reason I can't just 
weight by some function of recency at indexing time?

  $weight = get_weight_based_on_recency(...);
  $tg->index_text($txt,$weight);

If I wanted to allow the user the option of searching either in 
recency-weighted mode or not, I could index each document into 2 
different databases, one with and one without.

This avoids having to mess with subclassing PostingSource and C++ and 
all that.

  - Alex Aminoff
    NBER


On 05/03/2016 08:15 AM, James Aylett wrote:
> On Tue, May 03, 2016 at 07:56:19AM -0400, Alex Aminoff wrote:
>
>> Perhaps I am not understanding the basic concept, but I was figuring
>> we would just write a subclass of PostingSource in C++ that does
>> what we want, and not bother with the perl bindings. Is that not
>> possible? I realize that ideally we would develop the general
>> solution and share our code out to the community, but I assume that
>> would be more work.
> You should be able to subclass in C++ and then bind out to Perl to use
> it fairly easily. What would probably be more useful than having
> public, re-usable code is your experiences in using this approach to
> balance probabilistic weighting with reverse date weights.
>
> J
>




More information about the Xapian-discuss mailing list