0
0

Merge pull request #607 from mschoch/fix-query-string-numeric

fix issue with numeric range queries in query string
This commit is contained in:
Marty Schoch 2017-06-06 16:57:00 -04:00 committed by GitHub
commit 48ac9862db

View File

@ -57,16 +57,16 @@ func NewNumericRangeSearcher(indexReader index.IndexReader,
termRanges := splitInt64Range(minInt64, maxInt64, 4)
terms := termRanges.Enumerate()
if len(terms) < 1 {
return NewMatchNoneSearcher(indexReader)
// cannot return MatchNoneSearcher because of interaction with
// commit f391b991c20f02681bacd197afc6d8aed444e132
return NewMultiTermSearcherBytes(indexReader, terms, field, boost, options,
true)
}
var err error
terms, err = filterCandidateTerms(indexReader, terms, field)
if err != nil {
return nil, err
}
if len(terms) < 1 {
return NewMatchNoneSearcher(indexReader)
}
if tooManyClauses(len(terms)) {
return nil, tooManyClausesErr()
}