Hi,
In your new version there is a breaking change. The total weight can max 1
if (weightsTotal > 1) {
throw new Error('Total of weights cannot exceed 1')
}
it is ok but how can i handle this limitation.
My intention is:
from
{name: 'zip', weight: 0.5},
{name: 'city', weight: 0.4},
{name: 'street', weight: 0.3},
{name: 'land', weight: 0.02}
{name: 'housenummer', weight: 0.1},
to
{name: 'zip', weight: 0.05},
{name: 'city', weight: 0.04},
{name: 'street', weight: 0.03},
{name: 'land', weight: 0.02}
{name: 'housenummer', weight: 0.01},
Same problem here. After updating to 3.6.0 fuse throws the mentioned error from above.
By design, the total weights should not exceed 1, as it throws off the new scoring calculation. Could you not change the weights to accommodate this restriction?
Alternatively, I could normalize the weights so that they are between (0, 1)
I think it would be fine if you could normalize the weights.
I would agree, it would be great if the library could handle it. Seeing as the error was not thrown before, this is sort of a breaking change, that maybe one that should not be introduced in a minor version bump?
Most helpful comment
I would agree, it would be great if the library could handle it. Seeing as the error was not thrown before, this is sort of a breaking change, that maybe one that should not be introduced in a minor version bump?