helper

package
v0.0.0-...-5c72b2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ISO8601 = time.RFC3339Nano // "2006-01-02T15:04:05.9999999Z07:00"
)

Variables

This section is empty.

Functions

func BooleanQuery

func BooleanQuery(query *protobuf.BooleanQuery) (bluge.Query, error)

func Bytes2int

func Bytes2int(bytes ...byte) int64

Bytes2int converts []byte to int64

func Bytes2str

func Bytes2str(bytes ...byte) string

Bytes2str converts []byte to string("00 00 00 00 00 00 00 00")

func Bytes2uint

func Bytes2uint(bytes ...byte) uint64

Bytes2uint converts []byte to uint64

func DateRangeQuery

func DateRangeQuery(query *protobuf.DateRangeQuery) (bluge.Query, error)

func FormatISO8601

func FormatISO8601(t time.Time) string

func FuzzyQuery

func FuzzyQuery(query *protobuf.FuzzyQuery) (bluge.Query, error)

func GeoBoundingBoxQuery

func GeoBoundingBoxQuery(query *protobuf.GeoBoundingBoxQuery) (bluge.Query, error)

func GeoBoundingPolygonQuery

func GeoBoundingPolygonQuery(query *protobuf.GeoBoundingPolygonQuery) (bluge.Query, error)

func GeoDistanceQuery

func GeoDistanceQuery(query *protobuf.GeoDistanceQuery) (bluge.Query, error)

func GetFileNameWithoutExt

func GetFileNameWithoutExt(path string) string

func GetQuery

func GetQuery(field string, query *protobuf.Query) (bluge.Query, error)

func Int2bytes

func Int2bytes(i int, size int) []byte

Int2bytes converts int to []byte

func Interface2Float64

func Interface2Float64(value interface{}) (float64, bool)

func MatchAllQuery

func MatchAllQuery(query *protobuf.MatchAllQuery) (bluge.Query, error)

func MatchNoneQuery

func MatchNoneQuery(query *protobuf.MatchNoneQuery) (bluge.Query, error)

func MatchPhraseQuery

func MatchPhraseQuery(query *protobuf.MatchPhraseQuery) (bluge.Query, error)

func MatchQuery

func MatchQuery(query *protobuf.MatchQuery) (bluge.Query, error)

func MultiPhraseQuery

func MultiPhraseQuery(query *protobuf.MultiPhraseQuery) (bluge.Query, error)

func NumericRangeQuery

func NumericRangeQuery(query *protobuf.NumericRangeQuery) (bluge.Query, error)

func ParseISO8601

func ParseISO8601(s string) (time.Time, error)

func ParseISO8601InLocation

func ParseISO8601InLocation(s string) (time.Time, error)

func PrefixQuery

func PrefixQuery(query *protobuf.PrefixQuery) (bluge.Query, error)

func RegexpQuery

func RegexpQuery(query *protobuf.RegexpQuery) (bluge.Query, error)

func Str2bytes

func Str2bytes(str string) []byte

Str2bytes converts string("00 00 00 00 00 00 00 00") to []byte

func TermQuery

func TermQuery(query *protobuf.TermQuery) (bluge.Query, error)

func TermRangeQuery

func TermRangeQuery(query *protobuf.TermRangeQuery) (bluge.Query, error)

func Uint2bytes

func Uint2bytes(i uint64, size int) []byte

Uint2bytes converts uint64 to []byte

func WildcardQuery

func WildcardQuery(query *protobuf.WildcardQuery) (bluge.Query, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL