Add a ``field:[some range]`` term to the query.
        Matches will have a ``value`` in the range in the ``field``.

        Arguments:
            field (str): The field to check for the value.
                    The field must be namespaced according to Elasticsearch rules
                    using the dot syntax.
                    For example, ``"mdf.source_name"`` is the ``source_name`` field
                    of the ``mdf`` dictionary.
            start (str or int): The starting value, or ``None`` for no lower bound.
                    **Default:** ``None``.
            stop (str or int): The ending value, or ``None`` for no upper bound.
                    **Default:** ``None``.
            inclusive (bool): If ``True``, the ``start`` and ``stop`` values will be included
                    in the search.
                    If ``False``, the start and stop values will not be included
                    in the search.
                    **Default:** ``True``.
            required (bool): If ``True``, will add term with ``AND``.
                    If ``False``, will use ``OR``. **Default:** ``True``.
            new_group (bool): If ``True``, will separate the term into a new parenthetical group.
                    If ``False``, will not.
                    **Default:** ``False``.

        Returns:
            SearchHelper: Self

def match_range(self, field, start=None, stop=None, inclusive=True,
                    required=True, new_group=False):
        """Add a ``field:[some range]`` term to the query.
        Matches will have a ``value`` in the range in the ``field``.

        Arguments:
            field (str): The field to check for the value.
                    The field must be namespaced according to Elasticsearch rules
                    using the dot syntax.
                    For example, ``"mdf.source_name"`` is the ``source_name`` field
                    of the ``mdf`` dictionary.
            start (str or int): The starting value, or ``None`` for no lower bound.
                    **Default:** ``None``.
            stop (str or int): The ending value, or ``None`` for no upper bound.
                    **Default:** ``None``.
            inclusive (bool): If ``True``, the ``start`` and ``stop`` values will be included
                    in the search.
                    If ``False``, the start and stop values will not be included
                    in the search.
                    **Default:** ``True``.
            required (bool): If ``True``, will add term with ``AND``.
                    If ``False``, will use ``OR``. **Default:** ``True``.
            new_group (bool): If ``True``, will separate the term into a new parenthetical group.
                    If ``False``, will not.
                    **Default:** ``False``.

        Returns:
            SearchHelper: Self
        """
        # Accept None as *
        if start is None:
            start = "*"
        if stop is None:
            stop = "*"
        # *-* is the same as field exists
        if start == "*" and stop == "*":
            return self.match_exists(field, required=required, new_group=new_group)

        if inclusive:
            value = "[" + str(start) + " TO " + str(stop) + "]"
        else:
            value = "{" + str(start) + " TO " + str(stop) + "}"
        return self.match_field(field, value, required=required, new_group=new_group)