Ticket #307 (assigned enhancement)

Opened 3 months ago

Last modified 3 weeks ago

OP_SYNONYM should allow field weights to be set on its members

Reported by: richard Owned by: richard
Priority: normal Milestone: 1.1.1
Component: Matcher Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By: #50
Operating System: All Blocking:

Description (last modified by olly) (diff)

Currently, OP_SYNONYM simply adds up the wdfs of the member terms to calculate the wdf of the resulting item. However, it might be useful to allow OP_SYNONYM to be told to modify the wdfs of the member terms (using an integer multiplier). This would correspond functionally to the "weight" function implemented in scriptindex, which allows the weight of a field to be modified at index time by multiplying the wdf, but would allow the weights to be adjusted at search-time without requiring a re-index.

I'm not sure where in the API this would fit, but it's something to consider before merging the OP_SYNONYM branch to trunk.

Change History

Changed 3 months ago by richard

  • status changed from new to assigned
  • blockedby set to 50

Changed 3 months ago by olly

Is OP_SYNONYM with OP_SCALE_WEIGHT applied to the subqueries usefully close to this?

If you're going to allow scaling of wdf values like this, then you probably need to adjust the document length correspondingly, which seems to be an ugly direction. Otherwise you'll violate inequalities I think we currently rely on for optimising, such as: wdf(term,doc) <= doclen(doc)

Changed 4 weeks ago by richard

I can't see how you could apply SCALE_WEIGHT to the subqueries, since their weights aren't used: in OP_SYNOYNM, the weights are generated from the combined term frequency estimate and the sum of the wdfs - not by combining the weights of subqueries.

You're quite right that we'll need to be careful not to violate the inequalities, though - I hadn't thought of that.

Changed 4 weeks ago by olly

Ah yes, OP_SCALE_WEIGHT doesn't help here...

Changed 4 weeks ago by olly

  • description modified (diff)

Changed 3 weeks ago by olly

Bumping milestone to 1.1.1 as this is ready to apply and isn't an incompatible change.

Changed 3 weeks ago by olly

  • milestone changed from 1.1.0 to 1.1.1

Changed 3 weeks ago by richard

There isn't actually a fix for this one ready to apply, but it's fine to bump this to 1.1.1, anyway.

Note: See TracTickets for help on using tickets.