go mod and vendor/ update
This commit is contained in:
parent
9d332bbda4
commit
14e0611f06
704 changed files with 157354 additions and 39113 deletions
33
vendor/github.com/blevesearch/bleve/search/highlight/term_locations.go
generated
vendored
33
vendor/github.com/blevesearch/bleve/search/highlight/term_locations.go
generated
vendored
|
|
@ -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 highlight
|
||||
|
||||
|
|
@ -18,7 +23,7 @@ import (
|
|||
|
||||
type TermLocation struct {
|
||||
Term string
|
||||
ArrayPositions []float64
|
||||
ArrayPositions search.ArrayPositions
|
||||
Pos int
|
||||
Start int
|
||||
End int
|
||||
|
|
@ -98,15 +103,3 @@ func OrderTermLocations(tlm search.TermLocationMap) TermLocations {
|
|||
sort.Sort(rv)
|
||||
return rv
|
||||
}
|
||||
|
||||
func SameArrayPositions(fieldArrayPositions []uint64, termLocationArrayPositions []float64) bool {
|
||||
if len(fieldArrayPositions) != len(termLocationArrayPositions) {
|
||||
return false
|
||||
}
|
||||
for i := 0; i < len(fieldArrayPositions); i++ {
|
||||
if fieldArrayPositions[i] != uint64(termLocationArrayPositions[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue