diff --git a/src/whoosh/fields.py b/src/whoosh/fields.py index ebe72315..9df7f464 100644 --- a/src/whoosh/fields.py +++ b/src/whoosh/fields.py @@ -885,7 +885,7 @@ def parse_query(self, fieldname, qstring, boost=1.0): if is_ambiguous(at): startnum = datetime_to_long(at.floor()) endnum = datetime_to_long(at.ceil()) - return query.NumericRange(fieldname, startnum, endnum) + return query.NumericRange(fieldname, startnum, endnum, boost=boost) else: return query.Term(fieldname, at, boost=boost) diff --git a/src/whoosh/qparser/syntax.py b/src/whoosh/qparser/syntax.py index 8e0fb474..0c35ff91 100644 --- a/src/whoosh/qparser/syntax.py +++ b/src/whoosh/qparser/syntax.py @@ -450,6 +450,7 @@ class RangeNode(SyntaxNode): """ has_fieldname = True + has_boost = True def __init__(self, start, end, startexcl, endexcl): self.start = start