search

package
v1.0.0-beta.41 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 6 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) 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

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 Query

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

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) ToSortFields

func (q *Query) ToSortFields() string

Jump to

Keyboard shortcuts

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