cbft

package
Version: v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BooleanFieldQuery

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

BooleanFieldQuery represents a FTS boolean field query.

func NewBooleanFieldQuery

func NewBooleanFieldQuery(val bool) *BooleanFieldQuery

NewBooleanFieldQuery creates a new BooleanFieldQuery.

func (*BooleanFieldQuery) Boost

func (q *BooleanFieldQuery) Boost(boost float32) *BooleanFieldQuery

Boost specifies the boost for this query.

func (*BooleanFieldQuery) Field

func (q *BooleanFieldQuery) Field(field string) *BooleanFieldQuery

Field specifies the field for this query.

func (BooleanFieldQuery) MarshalJSON

func (q BooleanFieldQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type BooleanQuery

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

BooleanQuery represents a FTS boolean query.

func NewBooleanQuery

func NewBooleanQuery() *BooleanQuery

NewBooleanQuery creates a new BooleanQuery.

func (*BooleanQuery) Boost

func (q *BooleanQuery) Boost(boost float32) *BooleanQuery

Boost specifies the boost for this query.

func (*BooleanQuery) MarshalJSON

func (q *BooleanQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

func (*BooleanQuery) Must

func (q *BooleanQuery) Must(query FtsQuery) *BooleanQuery

Must specifies a query which must match.

func (*BooleanQuery) MustNot

func (q *BooleanQuery) MustNot(query FtsQuery) *BooleanQuery

MustNot specifies a query which must not match.

func (*BooleanQuery) Should

func (q *BooleanQuery) Should(query FtsQuery) *BooleanQuery

Should specifies a query which should match.

func (*BooleanQuery) ShouldMin

func (q *BooleanQuery) ShouldMin(min int) *BooleanQuery

ShouldMin specifies the minimum value before the should query will boost.

type ConjunctionQuery

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

ConjunctionQuery represents a FTS conjunction query.

func NewConjunctionQuery

func NewConjunctionQuery(queries ...FtsQuery) *ConjunctionQuery

NewConjunctionQuery creates a new ConjunctionQuery.

func (*ConjunctionQuery) And

func (q *ConjunctionQuery) And(queries ...FtsQuery) *ConjunctionQuery

And adds new predicate queries to this conjunction query.

func (*ConjunctionQuery) Boost

func (q *ConjunctionQuery) Boost(boost float32) *ConjunctionQuery

Boost specifies the boost for this query.

func (ConjunctionQuery) MarshalJSON

func (q ConjunctionQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type DateFacet

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

DateFacet is an FTS date range facet.

func NewDateFacet

func NewDateFacet(field string, size int) *DateFacet

NewDateFacet creates a new date range facet.

func (*DateFacet) AddRange

func (f *DateFacet) AddRange(name string, start, end string) *DateFacet

AddRange adds a new range to this date range facet.

func (DateFacet) MarshalJSON

func (f DateFacet) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this facet to JSON for the FTS REST API.

type DateRangeQuery

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

DateRangeQuery represents a FTS date range query.

func NewDateRangeQuery

func NewDateRangeQuery() *DateRangeQuery

NewDateRangeQuery creates a new DateRangeQuery.

func (*DateRangeQuery) Boost

func (q *DateRangeQuery) Boost(boost float32) *DateRangeQuery

Boost specifies the boost for this query.

func (*DateRangeQuery) DateTimeParser

func (q *DateRangeQuery) DateTimeParser(parser string) *DateRangeQuery

DateTimeParser specifies which date time string parser to use.

func (*DateRangeQuery) End

func (q *DateRangeQuery) End(end string, inclusive bool) *DateRangeQuery

End specifies the end value and inclusiveness for this range query.

func (*DateRangeQuery) Field

func (q *DateRangeQuery) Field(field string) *DateRangeQuery

Field specifies the field for this query.

func (DateRangeQuery) MarshalJSON

func (q DateRangeQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

func (*DateRangeQuery) Start

func (q *DateRangeQuery) Start(start string, inclusive bool) *DateRangeQuery

Start specifies the start value and inclusiveness for this range query.

type DisjunctionQuery

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

DisjunctionQuery represents a FTS disjunction query.

func NewDisjunctionQuery

func NewDisjunctionQuery(queries ...FtsQuery) *DisjunctionQuery

NewDisjunctionQuery creates a new DisjunctionQuery.

func (*DisjunctionQuery) Boost

func (q *DisjunctionQuery) Boost(boost float32) *DisjunctionQuery

Boost specifies the boost for this query.

func (DisjunctionQuery) MarshalJSON

func (q DisjunctionQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

func (*DisjunctionQuery) Or

func (q *DisjunctionQuery) Or(queries ...FtsQuery) *DisjunctionQuery

Or adds new predicate queries to this disjunction query.

type DocIdQuery

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

DocIdQuery represents a FTS document id query.

func NewDocIdQuery

func NewDocIdQuery(ids ...string) *DocIdQuery

NewDocIdQuery creates a new DocIdQuery.

func (*DocIdQuery) AddDocIds

func (q *DocIdQuery) AddDocIds(ids ...string) *DocIdQuery

AddDocIds adds addition document ids to this query.

func (*DocIdQuery) Boost

func (q *DocIdQuery) Boost(boost float32) *DocIdQuery

Boost specifies the boost for this query.

func (*DocIdQuery) Field

func (q *DocIdQuery) Field(field string) *DocIdQuery

Field specifies the field for this query.

func (DocIdQuery) MarshalJSON

func (q DocIdQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type FtsFacet

type FtsFacet interface {
}

FtsFacet represents a facet for a search query.

type FtsQuery

type FtsQuery interface {
}

FtsQuery represents an FTS query for a search query.

type FtsSort added in v1.2.3

type FtsSort interface {
}

FtsSort represents an FTS sorting for a search query.

type GeoBoundingBoxQuery added in v1.2.3

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

GeoBoundingBoxQuery represents a FTS geographical bounding box query.

func NewGeoBoundingBoxQuery added in v1.2.3

func NewGeoBoundingBoxQuery(tlLat, tlLon, brLat, brLon float64) *GeoBoundingBoxQuery

NewGeoBoundingBoxQuery creates a new GeoBoundingBoxQuery.

func (*GeoBoundingBoxQuery) Boost added in v1.2.3

Boost specifies the boost for this query.

func (*GeoBoundingBoxQuery) Field added in v1.2.3

Field specifies the field for this query.

func (GeoBoundingBoxQuery) MarshalJSON added in v1.2.3

func (q GeoBoundingBoxQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type GeoDistanceQuery added in v1.2.3

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

GeoDistanceQuery represents a FTS geographical distance query.

func NewGeoDistanceQuery added in v1.2.3

func NewGeoDistanceQuery(lat, lon float64, distance string) *GeoDistanceQuery

NewGeoDistanceQuery creates a new GeoDistanceQuery.

func (*GeoDistanceQuery) Boost added in v1.2.3

func (q *GeoDistanceQuery) Boost(boost float32) *GeoDistanceQuery

Boost specifies the boost for this query.

func (*GeoDistanceQuery) Field added in v1.2.3

func (q *GeoDistanceQuery) Field(field string) *GeoDistanceQuery

Field specifies the field for this query.

func (GeoDistanceQuery) MarshalJSON added in v1.2.3

func (q GeoDistanceQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type MatchAllQuery

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

MatchAllQuery represents a FTS match all query.

func NewMatchAllQuery

func NewMatchAllQuery() *MatchAllQuery

NewMatchAllQuery creates a new MatchAllQuery.

func (MatchAllQuery) MarshalJSON added in v1.5.0

func (q MatchAllQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type MatchNoneQuery

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

MatchNoneQuery represents a FTS match none query.

func NewMatchNoneQuery

func NewMatchNoneQuery() *MatchNoneQuery

NewMatchNoneQuery creates a new MatchNoneQuery.

func (MatchNoneQuery) MarshalJSON added in v1.5.0

func (q MatchNoneQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type MatchPhraseQuery

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

MatchPhraseQuery represents a FTS match phrase query.

func NewMatchPhraseQuery

func NewMatchPhraseQuery(phrase string) *MatchPhraseQuery

NewMatchPhraseQuery creates a new MatchPhraseQuery

func (*MatchPhraseQuery) Analyzer

func (q *MatchPhraseQuery) Analyzer(analyzer string) *MatchPhraseQuery

Analyzer specifies the analyzer to use for this query.

func (*MatchPhraseQuery) Boost

func (q *MatchPhraseQuery) Boost(boost float32) *MatchPhraseQuery

Boost specifies the boost for this query.

func (*MatchPhraseQuery) Field

func (q *MatchPhraseQuery) Field(field string) *MatchPhraseQuery

Field specifies the field for this query.

func (MatchPhraseQuery) MarshalJSON

func (q MatchPhraseQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type MatchQuery

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

MatchQuery represents a FTS match query.

func NewMatchQuery

func NewMatchQuery(match string) *MatchQuery

NewMatchQuery creates a new MatchQuery.

func (*MatchQuery) Analyzer

func (q *MatchQuery) Analyzer(analyzer string) *MatchQuery

Analyzer specifies the analyzer to use for this query.

func (*MatchQuery) Boost

func (q *MatchQuery) Boost(boost float32) *MatchQuery

Boost specifies the boost for this query.

func (*MatchQuery) Field

func (q *MatchQuery) Field(field string) *MatchQuery

Field specifies the field for this query.

func (*MatchQuery) Fuzziness

func (q *MatchQuery) Fuzziness(fuzziness int) *MatchQuery

Fuzziness specifies the fuziness for this query.

func (MatchQuery) MarshalJSON

func (q MatchQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

func (*MatchQuery) PrefixLength

func (q *MatchQuery) PrefixLength(length int) *MatchQuery

PrefixLength specifies the prefix length from this query.

type NumericFacet

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

NumericFacet is an FTS numeric range facet.

func NewNumericFacet

func NewNumericFacet(field string, size int) *NumericFacet

NewNumericFacet creates a new numeric range facet.

func (*NumericFacet) AddRange

func (f *NumericFacet) AddRange(name string, start, end float64) *NumericFacet

AddRange adds a new range to this numeric range facet.

func (NumericFacet) MarshalJSON

func (f NumericFacet) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this facet to JSON for the FTS REST API.

type NumericRangeQuery

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

NumericRangeQuery represents a FTS numeric range query.

func NewNumericRangeQuery

func NewNumericRangeQuery() *NumericRangeQuery

NewNumericRangeQuery creates a new NumericRangeQuery.

func (*NumericRangeQuery) Boost

func (q *NumericRangeQuery) Boost(boost float32) *NumericRangeQuery

Boost specifies the boost for this query.

func (*NumericRangeQuery) Field

func (q *NumericRangeQuery) Field(field string) *NumericRangeQuery

Field specifies the field for this query.

func (NumericRangeQuery) MarshalJSON

func (q NumericRangeQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

func (*NumericRangeQuery) Max

func (q *NumericRangeQuery) Max(max float32, inclusive bool) *NumericRangeQuery

Max specifies the maximum value and inclusiveness for this range query.

func (*NumericRangeQuery) Min

func (q *NumericRangeQuery) Min(min float32, inclusive bool) *NumericRangeQuery

Min specifies the minimum value and inclusiveness for this range query.

type PhraseQuery

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

PhraseQuery represents a FTS phrase query.

func NewPhraseQuery

func NewPhraseQuery(terms ...string) *PhraseQuery

NewPhraseQuery creates a new PhraseQuery.

func (*PhraseQuery) Boost

func (q *PhraseQuery) Boost(boost float32) *PhraseQuery

Boost specifies the boost for this query.

func (*PhraseQuery) Field

func (q *PhraseQuery) Field(field string) *PhraseQuery

Field specifies the field for this query.

func (PhraseQuery) MarshalJSON

func (q PhraseQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type PrefixQuery

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

PrefixQuery represents a FTS prefix query.

func NewPrefixQuery

func NewPrefixQuery(prefix string) *PrefixQuery

NewPrefixQuery creates a new PrefixQuery.

func (*PrefixQuery) Boost

func (q *PrefixQuery) Boost(boost float32) *PrefixQuery

Boost specifies the boost for this query.

func (*PrefixQuery) Field

func (q *PrefixQuery) Field(field string) *PrefixQuery

Field specifies the field for this query.

func (PrefixQuery) MarshalJSON

func (q PrefixQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type QueryStringQuery

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

QueryStringQuery represents a FTS string query.

func NewQueryStringQuery

func NewQueryStringQuery(query string) *QueryStringQuery

NewQueryStringQuery creates a new StringQuery.

func (*QueryStringQuery) Boost

func (q *QueryStringQuery) Boost(boost float32) *QueryStringQuery

Boost specifies the boost for this query.

func (QueryStringQuery) MarshalJSON

func (q QueryStringQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type RegexpQuery

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

RegexpQuery represents a FTS regular expression query.

func NewRegexpQuery

func NewRegexpQuery(regexp string) *RegexpQuery

NewRegexpQuery creates a new RegexpQuery.

func (*RegexpQuery) Boost

func (q *RegexpQuery) Boost(boost float32) *RegexpQuery

Boost specifies the boost for this query.

func (*RegexpQuery) Field

func (q *RegexpQuery) Field(field string) *RegexpQuery

Field specifies the field for this query.

func (RegexpQuery) MarshalJSON

func (q RegexpQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type SearchSortField added in v1.2.3

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

SearchSortField represents a FTS field sort.

func NewSearchSortField added in v1.2.3

func NewSearchSortField(field string) *SearchSortField

NewSearchSortField creates a new SearchSortField.

func (*SearchSortField) Descending added in v1.2.3

func (q *SearchSortField) Descending(descending bool) *SearchSortField

Descending specifies the ordering of the results.

func (SearchSortField) MarshalJSON added in v1.2.3

func (q SearchSortField) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

func (*SearchSortField) Missing added in v1.2.3

func (q *SearchSortField) Missing(missing string) *SearchSortField

Missing allows you to specify the FTS field sort missing behaviour.

func (*SearchSortField) Mode added in v1.2.3

func (q *SearchSortField) Mode(mode string) *SearchSortField

Mode allows you to specify the FTS field sort mode.

func (*SearchSortField) Type added in v1.2.3

func (q *SearchSortField) Type(value string) *SearchSortField

Type allows you to specify the FTS field sort type.

type SearchSortGeoDistance added in v1.2.3

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

SearchSortGeoDistance represents a FTS geo sort.

func NewSearchSortGeoDistance added in v1.2.3

func NewSearchSortGeoDistance(field string, lat, lon float64) *SearchSortGeoDistance

NewSearchSortGeoDistance creates a new SearchSortGeoDistance.

func (*SearchSortGeoDistance) Descending added in v1.2.3

func (q *SearchSortGeoDistance) Descending(descending bool) *SearchSortGeoDistance

Descending specifies the ordering of the results.

func (SearchSortGeoDistance) MarshalJSON added in v1.2.3

func (q SearchSortGeoDistance) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

func (*SearchSortGeoDistance) Unit added in v1.2.3

Unit specifies the unit used for sorting

type SearchSortId added in v1.2.3

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

SearchSortId represents a FTS Document ID sort.

func NewSearchSortId added in v1.2.3

func NewSearchSortId() *SearchSortId

NewSearchSortId creates a new SearchSortScore.

func (*SearchSortId) Descending added in v1.2.3

func (q *SearchSortId) Descending(descending bool) *SearchSortId

Descending specifies the ordering of the results.

func (SearchSortId) MarshalJSON added in v1.2.3

func (q SearchSortId) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type SearchSortScore added in v1.2.3

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

SearchSortScore represents a FTS score sort.

func NewSearchSortScore added in v1.2.3

func NewSearchSortScore() *SearchSortScore

NewSearchSortScore creates a new SearchSortScore.

func (*SearchSortScore) Descending added in v1.2.3

func (q *SearchSortScore) Descending(descending bool) *SearchSortScore

Descending specifies the ordering of the results.

func (SearchSortScore) MarshalJSON added in v1.2.3

func (q SearchSortScore) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

type TermFacet

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

TermFacet is an FTS term facet.

func NewTermFacet

func NewTermFacet(field string, size int) *TermFacet

NewTermFacet creates a new TermFacet

func (TermFacet) MarshalJSON

func (f TermFacet) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this facet to JSON for the FTS REST API.

type TermQuery

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

TermQuery represents a FTS term query.

func NewTermQuery

func NewTermQuery(term string) *TermQuery

NewTermQuery creates a new TermQuery.

func (*TermQuery) Boost

func (q *TermQuery) Boost(boost float32) *TermQuery

Boost specifies the boost for this query.

func (*TermQuery) Field

func (q *TermQuery) Field(field string) *TermQuery

Field specifies the field for this query.

func (*TermQuery) Fuzziness

func (q *TermQuery) Fuzziness(fuzziness int) *TermQuery

Fuzziness specifies the fuziness for this query.

func (TermQuery) MarshalJSON

func (q TermQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

func (*TermQuery) PrefixLength

func (q *TermQuery) PrefixLength(length int) *TermQuery

PrefixLength specifies the prefix length from this query.

type TermRangeQuery added in v1.2.3

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

TermRangeQuery represents a FTS term range query.

func NewTermRangeQuery added in v1.2.3

func NewTermRangeQuery(term string) *TermRangeQuery

NewTermRangeQuery creates a new TermRangeQuery.

func (*TermRangeQuery) Boost added in v1.2.3

func (q *TermRangeQuery) Boost(boost float32) *TermRangeQuery

Boost specifies the boost for this query.

func (*TermRangeQuery) Field added in v1.2.3

func (q *TermRangeQuery) Field(field string) *TermRangeQuery

Field specifies the field for this query.

func (TermRangeQuery) MarshalJSON added in v1.2.3

func (q TermRangeQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

func (*TermRangeQuery) Max added in v1.2.3

func (q *TermRangeQuery) Max(max string, inclusive bool) *TermRangeQuery

Max specifies the maximum value and inclusiveness for this range query.

func (*TermRangeQuery) Min added in v1.2.3

func (q *TermRangeQuery) Min(min string, inclusive bool) *TermRangeQuery

Min specifies the minimum value and inclusiveness for this range query.

type WildcardQuery

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

WildcardQuery represents a FTS wildcard query.

func NewWildcardQuery

func NewWildcardQuery(wildcard string) *WildcardQuery

NewWildcardQuery creates a new WildcardQuery.

func (*WildcardQuery) Boost

func (q *WildcardQuery) Boost(boost float32) *WildcardQuery

Boost specifies the boost for this query.

func (*WildcardQuery) Field

func (q *WildcardQuery) Field(field string) *WildcardQuery

Field specifies the field for this query.

func (WildcardQuery) MarshalJSON

func (q WildcardQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the FTS REST API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL