Fixed frequency reporting in queries
diff --git a/lib/Krawfish/Koral/Query/Focus.pm b/lib/Krawfish/Koral/Query/Focus.pm
index 8adf045..9eec971 100644
--- a/lib/Krawfish/Koral/Query/Focus.pm
+++ b/lib/Krawfish/Koral/Query/Focus.pm
@@ -4,6 +4,11 @@
use strict;
use warnings;
+# TODO:
+# If span is maybe_unsorted, use a sorted focus,
+# otherwise an unsorted focus.
+
+
sub new {
my $class = shift;
bless {
@@ -16,8 +21,8 @@
$_[0]->{nrs};
};
-# If span is maybe_unsorted, use a sorted focus, otherwise an unsorted focus.
+# Optimize query to potentially need sorting
sub optimize {
my ($self, $index) = @_;
@@ -30,7 +35,7 @@
};
# Span has no match
- if ($span->freq == 0) {
+ if ($span->max_freq == 0) {
return $self->builder->nothing;
};