Ticket #182 (assigned defect)

Opened 18 months ago

Last modified 3 weeks ago

Match decider should be set on enquire object, not as get_mset() param

Reported by: richard Owned by: richard
Priority: normal Milestone: 2.0.0
Component: Library API Version: SVN trunk
Severity: normal Keywords:
Cc: olly Blocked By: #186
Operating System: All Blocking:

Description (last modified by olly) (diff)

Currently, match deciders (and match spies) are specified by passing them as get_mset() parameters. It would be neater, and reduce the excessive number of parameters passed to get_mset(), if there was a "set_match_decider" function, instead of these parameters.

We could also use this style of API to support things like multiple match deciders, where each would be called in sequence, allowing only those documents which pass all deciders to be returned. This would be useful if only a limited set of predefined match deciders were available (for example, in a remote search, or when calling from Python), and a combination of restrictions was desired.

Change History

Changed 18 months ago by richard

  • status changed from new to assigned
  • blocking set to 120

This could be done in the 1.0.x series by adding the new function, but allowing the old parameters to be used additionally. (If a match decider was set in the query parameters, it would be checked as well as the deciders set by set_match_decider.)

The old parameters could then be deprecated, and finally removed in 1.2.0.

Changed 17 months ago by olly

  • cc olly@… added
  • blocking deleted
  • blockedby set to 186

The choice of API here is deliberate. MatchDeciders? aren't reference counted, so providing a method to set them would create a trap for users, especially those using scripting languages. As things currently stand, the MatchDecider? object only has to be valid during the get_mset() method call, which it always will be.

If we can work out a good way to make MatchDeciders? reference counted then this change is worth considering, so marking this as blocked by bug#186.

Changed 17 months ago by trac

  • platform set to All

Changed 3 weeks ago by olly

  • description modified (diff)
  • milestone set to 2.0.0

Due to the blockage, this can't be done until 2.0.0.

Note: See TracTickets for help on using tickets.