Opened 17 years ago

Closed 14 years ago

Last modified 14 years ago

#182 closed enhancement (wontfix)

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

Reported by: Richard Boulton Owned by: Richard Boulton
Priority: normal Milestone:
Component: Library API Version: SVN trunk
Severity: normal Keywords:
Cc: Olly Betts Blocked By:
Blocking: Operating System: All

Description (last modified by Olly Betts)

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 (7)

comment:1 by Richard Boulton, 17 years ago

Blocking: 120 added
Status: newassigned

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.

comment:2 by Olly Betts, 17 years ago

Blocked By: 186 added
Blocking: 120 removed
Cc: olly@… added
Operating System: All

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.

comment:4 by Olly Betts, 15 years ago

Description: modified (diff)
Milestone: 2.0.0

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

comment:5 by Olly Betts, 15 years ago

Type: defectenhancement

Marking as "enchancement" rather than "defect".

comment:6 by Olly Betts, 14 years ago

Blocked By: 186 removed

(In #186) Removing "blocking", since removing reciprocal "blocked-by" from #182 didn't seem to do so automatically.

comment:7 by Olly Betts, 14 years ago

Resolution: wontfix
Status: assignedclosed

Hmm, trac seems to have eaten my earlier change, which I guess was why it didn't update the blocking relationship.

To repeat, since we're planning to deprecate MatchDecider, this is no longer relevant, so closing as "wontfix".

comment:8 by Olly Betts, 14 years ago

Milestone: 2.0.0

Unsetting milestone.

Note: See TracTickets for help on using tickets.