search

package
v1.0.0-beta.92 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Build

func (b *Builder) Build() *Query

func (*Builder) Facets

func (b *Builder) Facets(facets Facets) *Builder

func (*Builder) Filter

func (b *Builder) Filter(w *filter.WrappedFilter) *Builder

func (*Builder) GroupBy

func (b *Builder) GroupBy(groupBy GroupBy) *Builder

func (*Builder) PageSize

func (b *Builder) PageSize(s int) *Builder

func (*Builder) Query

func (b *Builder) Query(q string) *Builder

func (*Builder) ReadFields

func (b *Builder) ReadFields(f *read.FieldFactory) *Builder

func (*Builder) SearchFields

func (b *Builder) SearchFields(f []string) *Builder

func (*Builder) SortOrder

func (b *Builder) SortOrder(o *sort.Ordering) *Builder

func (*Builder) VectorSearch

func (b *Builder) VectorSearch(vecSearch VectorSearch) *Builder

type FacetField

type FacetField struct {
	Name string
	Type string
	Size int
}

func NewFacetField

func NewFacetField(name string, value jsoniter.RawMessage) (FacetField, error)

type Facets

type Facets struct {
	Fields []FacetField
}

func UnmarshalFacet

func UnmarshalFacet(input jsoniter.RawMessage) (Facets, error)

type GroupBy

type GroupBy struct {
	Fields []string
	Limit  *int64
}

func UnmarshalGroupBy

func UnmarshalGroupBy(input jsoniter.RawMessage) (GroupBy, error)

type Query

type Query struct {
	Q            string
	SearchFields []string
	Facets       Facets
	PageSize     int
	WrappedF     *filter.WrappedFilter
	ReadFields   *read.FieldFactory
	SortOrder    *sort.Ordering
	GroupBy      GroupBy
	VectorS      VectorSearch
}

func (*Query) IsGroupByQuery

func (q *Query) IsGroupByQuery() bool

func (*Query) IsQAndVectorBoth

func (q *Query) IsQAndVectorBoth() bool

func (*Query) IsVectorSearch

func (q *Query) IsVectorSearch() bool

func (*Query) ToSearchFacetSize

func (q *Query) ToSearchFacetSize() int

func (*Query) ToSearchFacets

func (q *Query) ToSearchFacets() string

func (*Query) ToSearchFields

func (q *Query) ToSearchFields() string

func (*Query) ToSearchGroupBy

func (q *Query) ToSearchGroupBy() string

func (*Query) ToSearchVector

func (q *Query) ToSearchVector() string

func (*Query) ToSortFields

func (q *Query) ToSortFields() string

type VectorSearch

type VectorSearch struct {
	TopK       int `json:"top_k,omitempty"`
	VectorF    string
	VectorV    []float64
	RawVectorV []byte
}

func UnmarshalVectorSearch

func UnmarshalVectorSearch(input jsoniter.RawMessage) (VectorSearch, error)

Jump to

Keyboard shortcuts

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