[Xapian-discuss] BM25

James Aylett james-xapian at tartarus.org
Tue Nov 9 09:56:37 GMT 2004

On Tue, Nov 09, 2004 at 05:31:20AM +0000, Olly Betts wrote:

> Incidentally, I think it's confusing that Xapian has a unique naming scheme
> for the parameters, while most other references are consistent in their
> choice of names.  I think we should use the standard names instead.

I agree.

> We could just change the parameter names, which would keep compatibility
> with existing code - this would make the constructor look like this:
>     BM25Weight(double k3, double k1, double k2, double b, double min_normlen)
> If we wanted to put k1, k2, k3 in a more natural order, we need to break
> compatibility (which will probably affect very few people as I suspect
> most use the default parameters) or find a way to support the old parameter
> ordering (such as adding a new constructor with a different signature,
> or having a new name for the updated class - Xapian::NewBM25Weight or
> something).
> Any thoughts?

Off the top of my head, if we moved the weighting classes into a
subnamespace Xapian::Weight, we could rename BM25Weight to
Xapian::Weight::BM25, and make a new constructor with a more sensible
order /and/ fix C at the same time to remove our doubling
factor. Xapian::BM25Weight could be kept as a thin wrapper maintaining
to old constructor semantics.


  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org

More information about the Xapian-discuss mailing list