#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 )
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 , 17 years ago
Blocking: | 120 added |
---|---|
Status: | new → assigned |
comment:2 by , 17 years ago
Blocked By: | 186 added |
---|---|
Blocking: | 120 removed |
Cc: | 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 , 16 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 , 16 years ago
Type: | defect → enhancement |
---|
Marking as "enchancement" rather than "defect".
comment:6 by , 15 years ago
Blocked By: | 186 removed |
---|
comment:7 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
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".
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.