This works functionally to select exactly one document, but it does not help if the check is for performance reasons. Suppose I select on a non-key field - there may be one document at the very end of the search, but the runtime would be horrible.
I like the parameter idea though. It would also take care of the field exit (leading zeroes) but have a good performance.
If the select-option is a given, you can loop and pick the first/last value for a SELECT with 'EQ'.
Wolfgang