forked from forgejo/forgejo
Upgrade blevesearch dependency to v2.0.1 (#14346)
* Upgrade blevesearch dependency to v2.0.1 * Update rupture to v1.0.0 * Fix test
This commit is contained in:
parent
3aa53dc6bc
commit
f5abe2f563
459 changed files with 7518 additions and 4211 deletions
78
vendor/github.com/blevesearch/bleve_index_api/document.go
generated
vendored
Normal file
78
vendor/github.com/blevesearch/bleve_index_api/document.go
generated
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
// Copyright (c) 2015 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.
|
||||
|
||||
package index
|
||||
|
||||
import "time"
|
||||
|
||||
type Document interface {
|
||||
ID() string
|
||||
Size() int
|
||||
|
||||
VisitFields(visitor FieldVisitor)
|
||||
VisitComposite(visitor CompositeFieldVisitor)
|
||||
HasComposite() bool
|
||||
|
||||
NumPlainTextBytes() uint64
|
||||
|
||||
AddIDField()
|
||||
}
|
||||
|
||||
type FieldVisitor func(Field)
|
||||
|
||||
type Field interface {
|
||||
Name() string
|
||||
Value() []byte
|
||||
ArrayPositions() []uint64
|
||||
|
||||
EncodedFieldType() byte
|
||||
|
||||
Analyze()
|
||||
|
||||
Options() FieldIndexingOptions
|
||||
|
||||
AnalyzedLength() int
|
||||
AnalyzedTokenFrequencies() TokenFrequencies
|
||||
|
||||
NumPlainTextBytes() uint64
|
||||
}
|
||||
|
||||
type CompositeFieldVisitor func(field CompositeField)
|
||||
|
||||
type CompositeField interface {
|
||||
Field
|
||||
|
||||
Compose(field string, length int, freq TokenFrequencies)
|
||||
}
|
||||
|
||||
type TextField interface {
|
||||
Text() string
|
||||
}
|
||||
|
||||
type NumericField interface {
|
||||
Number() (float64, error)
|
||||
}
|
||||
|
||||
type DateTimeField interface {
|
||||
DateTime() (time.Time, error)
|
||||
}
|
||||
|
||||
type BooleanField interface {
|
||||
Boolean() (bool, error)
|
||||
}
|
||||
|
||||
type GeoPointField interface {
|
||||
Lon() (float64, error)
|
||||
Lat() (float64, error)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue