Merge pull request #607 from mschoch/fix-query-string-numeric
fix issue with numeric range queries in query string
This commit is contained in:
commit
48ac9862db
|
@ -57,16 +57,16 @@ func NewNumericRangeSearcher(indexReader index.IndexReader,
|
||||||
termRanges := splitInt64Range(minInt64, maxInt64, 4)
|
termRanges := splitInt64Range(minInt64, maxInt64, 4)
|
||||||
terms := termRanges.Enumerate()
|
terms := termRanges.Enumerate()
|
||||||
if len(terms) < 1 {
|
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
|
var err error
|
||||||
terms, err = filterCandidateTerms(indexReader, terms, field)
|
terms, err = filterCandidateTerms(indexReader, terms, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(terms) < 1 {
|
|
||||||
return NewMatchNoneSearcher(indexReader)
|
|
||||||
}
|
|
||||||
if tooManyClauses(len(terms)) {
|
if tooManyClauses(len(terms)) {
|
||||||
return nil, tooManyClausesErr()
|
return nil, tooManyClausesErr()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user