go mod and vendor/ update

This commit is contained in:
ston1th 2018-09-14 00:14:04 +02:00
commit 14e0611f06
704 changed files with 157354 additions and 39113 deletions

View file

@ -1,11 +1,16 @@
// Copyright (c) 2014 Couchbase, Inc.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package document
@ -13,10 +18,10 @@ import (
"fmt"
"github.com/blevesearch/bleve/analysis"
"github.com/blevesearch/bleve/numeric_util"
"github.com/blevesearch/bleve/numeric"
)
const DefaultNumericIndexingOptions = StoreField | IndexField
const DefaultNumericIndexingOptions = StoreField | IndexField | DocValues
const DefaultPrecisionStep uint = 4
@ -24,7 +29,7 @@ type NumericField struct {
name string
arrayPositions []uint64
options IndexingOptions
value numeric_util.PrefixCoded
value numeric.PrefixCoded
numPlainTextBytes uint64
}
@ -55,7 +60,7 @@ func (n *NumericField) Analyze() (int, analysis.TokenFrequencies) {
shift := DefaultPrecisionStep
for shift < 64 {
shiftEncoded, err := numeric_util.NewPrefixCodedInt64(original, shift)
shiftEncoded, err := numeric.NewPrefixCodedInt64(original, shift)
if err != nil {
break
}
@ -85,7 +90,7 @@ func (n *NumericField) Number() (float64, error) {
if err != nil {
return 0.0, err
}
return numeric_util.Int64ToFloat64(i64), nil
return numeric.Int64ToFloat64(i64), nil
}
func (n *NumericField) GoString() string {
@ -111,8 +116,8 @@ func NewNumericField(name string, arrayPositions []uint64, number float64) *Nume
}
func NewNumericFieldWithIndexingOptions(name string, arrayPositions []uint64, number float64, options IndexingOptions) *NumericField {
numberInt64 := numeric_util.Float64ToInt64(number)
prefixCoded := numeric_util.MustNewPrefixCodedInt64(numberInt64, 0)
numberInt64 := numeric.Float64ToInt64(number)
prefixCoded := numeric.MustNewPrefixCodedInt64(numberInt64, 0)
return &NumericField{
name: name,
arrayPositions: arrayPositions,