Documentation ¶
Index ¶
Constants ¶
View Source
const TopOccurrencesType = "topOccurrences"
Variables ¶
View Source
var ( CountAggregator = Aggregator{Type: "count"} TypeAggregator = Aggregator{Type: "type"} )
Aggregators used in every prop
View Source
var ( SumAggregator = Aggregator{Type: "sum"} MeanAggregator = Aggregator{Type: "mean"} ModeAggregator = Aggregator{Type: "mode"} MedianAggregator = Aggregator{Type: "median"} MaximumAggregator = Aggregator{Type: "maximum"} MinimumAggregator = Aggregator{Type: "minimum"} )
Aggregators used in numerical props
View Source
var ( TotalTrueAggregator = Aggregator{Type: "totalTrue"} PercentageTrueAggregator = Aggregator{Type: "percentageTrue"} TotalFalseAggregator = Aggregator{Type: "totalFalse"} PercentageFalseAggregator = Aggregator{Type: "percentageFalse"} )
Aggregators used in boolean props
View Source
var (
PointingToAggregator = Aggregator{Type: "pointingTo"}
)
Aggregators used in ref props
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator struct { Type string `json:"type"` Limit *int `json:"limit"` // used on TopOccurrence Agg }
func NewTopOccurrencesAggregator ¶
func NewTopOccurrencesAggregator(limit *int) Aggregator
NewTopOccurrencesAggregator creates a TopOccurrencesAggregator, we cannot use a singleton for this as the desired limit can be different each time
func ParseAggregatorProp ¶
func ParseAggregatorProp(name string) (Aggregator, error)
func (Aggregator) String ¶
func (a Aggregator) String() string
type GroupedBy ¶
type GroupedBy struct { Value interface{} `json:"value"` Path []string `json:"path"` }
type ParamProperty ¶
type ParamProperty struct { Name schema.PropertyName `json:"name"` Aggregators []Aggregator `json:"aggregators"` }
type Params ¶
type Params struct { Filters *filters.LocalFilter `json:"filters"` ClassName schema.ClassName `json:"className"` Properties []ParamProperty `json:"properties"` GroupBy *filters.Path `json:"groupBy"` IncludeMetaCount bool `json:"includeMetaCount"` Limit *int `json:"limit"` ObjectLimit *int `json:"objectLimit"` SearchVector []float32 `json:"searchVector"` TargetVector string `json:"targetVector"` Certainty float64 `json:"certainty"` Tenant string `json:"tenant"` ModuleParams map[string]interface{} `json:"moduleParams"` NearVector *searchparams.NearVector `json:"nearVector"` NearObject *searchparams.NearObject `json:"nearObject"` Hybrid *searchparams.HybridSearch `json:"hybrid"` }
type Property ¶
type Property struct { Type PropertyType `json:"type"` NumericalAggregations map[string]interface{} `json:"numericalAggregations"` TextAggregation Text `json:"textAggregation"` BooleanAggregation Boolean `json:"booleanAggregation"` SchemaType string `json:"schemaType"` ReferenceAggregation Reference `json:"referenceAggregation"` DateAggregations map[string]interface{} `json:"dateAggregation"` }
type PropertyType ¶
type PropertyType string
const ( PropertyTypeNumerical PropertyType = "numerical" PropertyTypeBoolean PropertyType = "boolean" PropertyTypeText PropertyType = "text" PropertyTypeDate PropertyType = "date" PropertyTypeReference PropertyType = "cref" )
type Text ¶
type Text struct { Items []TextOccurrence `json:"items"` Count int `json:"count"` }
type TextOccurrence ¶
Click to show internal directories.
Click to hide internal directories.