Documentation ¶
Overview ¶
Package indexlib organizes codes of the indexing library
Index ¶
- Variables
- func DeduceType(value any) (string, bool)
- func ValidateValue(mType string, value any) bool
- type AggDateHistogram
- type AggDateRange
- type AggFilter
- type AggHistogram
- type AggMetric
- type AggNumericRange
- type AggPercentiles
- type AggTerms
- type AggWeightedAvg
- type Aggregation
- type Aggs
- type BaseQuery
- type BooleanQuery
- type Config
- type DateHistogramBound
- type DateRange
- type FileSystem
- type HistogramBound
- type Hit
- type Hits
- type HookReader
- type LibFieldType
- type MatchAllQuery
- type MatchPhraseQuery
- type MatchQuery
- type NumericRange
- type ObjectStorageService
- type QueryRequest
- type QueryResponse
- type QueryString
- type RangeQuery
- type RangeVal
- type Reader
- type Sort
- type SortTerm
- type TermQuery
- type Terms
- type TermsQuery
- type Total
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var FieldTypes map[string]LibFieldType
FieldTypes maps from the mapping type to the index library type it belongs to.
Functions ¶
func DeduceType ¶
DeduceType deduced Tatris field type from the value reference from: https://www.elastic.co/guide/en/elasticsearch/reference/8.6/dynamic-field-mapping.html
func ValidateValue ¶
Types ¶
type AggDateHistogram ¶
type AggDateRange ¶
type AggFilter ¶
type AggFilter struct {
FilterQuery QueryRequest
}
type AggHistogram ¶
type AggHistogram struct { Field string Interval float64 MinDocCount int Offset float64 Keyed bool Missing string ExtendedBounds *HistogramBound HardBounds *HistogramBound }
type AggNumericRange ¶
type AggNumericRange struct { Field string Ranges []NumericRange Keyed bool }
type AggPercentiles ¶
type AggWeightedAvg ¶
type Aggregation ¶
type Aggs ¶
type Aggs struct { Terms *AggTerms NumericRange *AggNumericRange DateRange *AggDateRange Count *AggMetric Sum *AggMetric Min *AggMetric Max *AggMetric Avg *AggMetric Cardinality *AggMetric WeightedAvg *AggWeightedAvg Percentiles *AggPercentiles DateHistogram *AggDateHistogram Histogram *AggHistogram Filter *AggFilter Aggs map[string]Aggs }
type BaseQuery ¶
func NewBaseQuery ¶
func NewBaseQuery() *BaseQuery
type BooleanQuery ¶
type BooleanQuery struct { *BaseQuery Musts []QueryRequest Shoulds []QueryRequest MustNots []QueryRequest Filters []QueryRequest MinShould int }
func NewBooleanQuery ¶
func NewBooleanQuery() *BooleanQuery
type Config ¶
type Config struct { IndexLib string DirectoryType string FS *FileSystem OSS *ObjectStorageService }
type DateHistogramBound ¶
type FileSystem ¶
type FileSystem struct {
Path string
}
type HistogramBound ¶
type HookReader ¶
HookReader wraps another Reader and uses hooks to intercept Reader's funcs. It only supports intercepting the 'Close' func at the present time.
func (*HookReader) Close ¶
func (r *HookReader) Close()
type LibFieldType ¶
type LibFieldType struct { Type string // lib type MappingTypes []string // Tatris mapping types Validator func(value any) bool // used to validate whether the value matches the field type }
LibFieldType defines the field types supported by Tatris based on the underlying index library.
func ValidateMappingType ¶
func ValidateMappingType(mType string) (bool, LibFieldType)
type MatchAllQuery ¶
type MatchAllQuery struct {
*BaseQuery
}
func NewMatchAllQuery ¶
func NewMatchAllQuery() *MatchAllQuery
type MatchPhraseQuery ¶
type MatchPhraseQuery struct { *BaseQuery MatchPhrase string Field string Analyzer string Slop int // Defaults to 0 }
func NewMatchPhraseQuery ¶
func NewMatchPhraseQuery() *MatchPhraseQuery
type MatchQuery ¶
type MatchQuery struct { *BaseQuery Match string Field string Analyzer string // STANDARD(default), KEYWORD, SIMPLE, WEB Prefix int // Defaults to 0 Fuzziness int Operator string // OR, AND }
func NewMatchQuery ¶
func NewMatchQuery() *MatchQuery
type NumericRange ¶
type ObjectStorageService ¶
type QueryRequest ¶
type QueryResponse ¶
type QueryResponse struct { Took int64 `json:"took"` Hits Hits `json:"hits"` Aggregations map[string]Aggregation `json:"aggregations"` }
type QueryString ¶
func NewQueryString ¶
func NewQueryString() *QueryString
type RangeQuery ¶
func NewRangeQuery ¶
func NewRangeQuery() *RangeQuery
type RangeVal ¶
type RangeVal struct { GT interface{} GTE interface{} LT interface{} LTE interface{} }
type Reader ¶
type Reader interface { OpenReader() error Search(ctx context.Context, req QueryRequest, limit, from int) (*QueryResponse, error) Count() int Close() }
func UnwrapReader ¶
UnwrapReader unwraps a reader to the underlying reader if it wraps other reader.
type TermQuery ¶
func NewTermQuery ¶
func NewTermQuery() *TermQuery
type TermsQuery ¶
func NewTermsQuery ¶
func NewTermsQuery() *TermsQuery
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package bluge organizes codes of the indexing library bluge
|
Package bluge organizes codes of the indexing library bluge |
aggregations
Package aggregations contains custom aggregation for bluge
|
Package aggregations contains custom aggregation for bluge |
config
Package config organizes codes of the bluge config
|
Package config organizes codes of the bluge config |
directory/fs
Package fs is just a simple encapsulation of index.NewFileSystemDirectory for logging time cost.
|
Package fs is just a simple encapsulation of index.NewFileSystemDirectory for logging time cost. |
directory/oss
Package oss is used to implement the AliCloud-Object-Storage-Service storage medium for the underlying data and indexes.
|
Package oss is used to implement the AliCloud-Object-Storage-Service storage medium for the underlying data and indexes. |
Package manage organizes codes of the indexing library manage
|
Package manage organizes codes of the indexing library manage |
Click to show internal directories.
Click to hide internal directories.