If I have no documents within a RangeFilter's range, then the filter
returns all (otherwise matching) documents, or just a couple of matches.
Playing with 512-range_filter.t, I get various unexpected results.
my @letters = 3 .. 7;
my $results = test_filtered_search(
field => 'name',
lower_term => 1,
upper_term => 2,
include_upper => 1,
include_lower => 1,
);
I expect that to give no results, but it gives that $letters[0] and
$letters[1] (3, and 4) match. If I set include_upper to 0, I get the
expected results (none). Changing include_lower has no effect. This seems
quite wrong to me.
However, if instead of:
lower_term => 1,
upper_term => 2,
I have:
lower_term => 8,
upper_term => 9,
(that is, the bounds are *greater* than the existing document values), then
*all* the results are returned (regardless of the values of include_*).
I believe both behaviors (the include_upper thing, and the returning all
results thing) are bugs, but I am not entirely sure. I do know they are
not the behavior I want. :-)
--
Chris Nandor pudge@pobox.com http://pudge.net/
Open Source Technology Group pudge@ostg.com http://ostg.com/
returns all (otherwise matching) documents, or just a couple of matches.
Playing with 512-range_filter.t, I get various unexpected results.
my @letters = 3 .. 7;
my $results = test_filtered_search(
field => 'name',
lower_term => 1,
upper_term => 2,
include_upper => 1,
include_lower => 1,
);
I expect that to give no results, but it gives that $letters[0] and
$letters[1] (3, and 4) match. If I set include_upper to 0, I get the
expected results (none). Changing include_lower has no effect. This seems
quite wrong to me.
However, if instead of:
lower_term => 1,
upper_term => 2,
I have:
lower_term => 8,
upper_term => 9,
(that is, the bounds are *greater* than the existing document values), then
*all* the results are returned (regardless of the values of include_*).
I believe both behaviors (the include_upper thing, and the returning all
results thing) are bugs, but I am not entirely sure. I do know they are
not the behavior I want. :-)
--
Chris Nandor pudge@pobox.com http://pudge.net/
Open Source Technology Group pudge@ostg.com http://ostg.com/