Documentation ¶
Index ¶
- type BooleanFieldQuery
- type BooleanQuery
- func (q *BooleanQuery) Boost(boost float32) *BooleanQuery
- func (q *BooleanQuery) MarshalJSON() ([]byte, error)
- func (q *BooleanQuery) Must(query FtsQuery) *BooleanQuery
- func (q *BooleanQuery) MustNot(query FtsQuery) *BooleanQuery
- func (q *BooleanQuery) Should(query FtsQuery) *BooleanQuery
- func (q *BooleanQuery) ShouldMin(min int) *BooleanQuery
- type ConjunctionQuery
- type DateFacet
- type DateRangeQuery
- func (q *DateRangeQuery) Boost(boost float32) *DateRangeQuery
- func (q *DateRangeQuery) DateTimeParser(parser string) *DateRangeQuery
- func (q *DateRangeQuery) End(end string, inclusive bool) *DateRangeQuery
- func (q *DateRangeQuery) Field(field string) *DateRangeQuery
- func (q DateRangeQuery) MarshalJSON() ([]byte, error)
- func (q *DateRangeQuery) Start(start string, inclusive bool) *DateRangeQuery
- type DisjunctionQuery
- type DocIdQuery
- type FtsFacet
- type FtsQuery
- type MatchAllQuery
- type MatchNoneQuery
- type MatchPhraseQuery
- type MatchQuery
- func (q *MatchQuery) Analyzer(analyzer string) *MatchQuery
- func (q *MatchQuery) Boost(boost float32) *MatchQuery
- func (q *MatchQuery) Field(field string) *MatchQuery
- func (q *MatchQuery) Fuzziness(fuzziness int) *MatchQuery
- func (q MatchQuery) MarshalJSON() ([]byte, error)
- func (q *MatchQuery) PrefixLength(length int) *MatchQuery
- type NumericFacet
- type NumericRangeQuery
- func (q *NumericRangeQuery) Boost(boost float32) *NumericRangeQuery
- func (q *NumericRangeQuery) Field(field string) *NumericRangeQuery
- func (q NumericRangeQuery) MarshalJSON() ([]byte, error)
- func (q *NumericRangeQuery) Max(max float32, inclusive bool) *NumericRangeQuery
- func (q *NumericRangeQuery) Min(min float32, inclusive bool) *NumericRangeQuery
- type PhraseQuery
- type PrefixQuery
- type QueryStringQuery
- type RegexpQuery
- type TermFacet
- type TermQuery
- type WildcardQuery
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 ¶
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 ¶
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 ¶
NewDateFacet creates a new date range facet.
func (DateFacet) MarshalJSON ¶
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 ¶
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 ¶
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 ¶
MarshalJSON marshal's this query to JSON for the FTS REST API.
type FtsFacet ¶
type FtsFacet interface { }
*VOLATILE* FtsFacet represents a facet for a search query.
type FtsQuery ¶
type FtsQuery interface { }
*VOLATILE* FtsQuery represents an FTS query for a search query.
type MatchAllQuery ¶
type MatchAllQuery struct { }
MatchAllQuery represents a FTS match all query.
func NewMatchAllQuery ¶
func NewMatchAllQuery(prefix string) *MatchAllQuery
NewMatchAllQuery creates a new MatchAllQuery.
type MatchNoneQuery ¶
type MatchNoneQuery struct { }
MatchNoneQuery represents a FTS match none query.
func NewMatchNoneQuery ¶
func NewMatchNoneQuery(prefix string) *MatchNoneQuery
NewMatchNoneQuery creates a new MatchNoneQuery.
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
MarshalJSON marshal's this query to JSON for the FTS REST API.
type QueryStringQuery ¶
type QueryStringQuery struct {
// contains filtered or unexported fields
}
StringQuery represents a FTS string query.
func NewQueryStringQuery ¶
func NewQueryStringQuery(query string) *QueryStringQuery
NewStringQuery creates a new StringQuery.
func (*QueryStringQuery) Boost ¶
func (q *QueryStringQuery) Boost(boost float32) *QueryStringQuery
Boost specifies the boost for this query.
func (QueryStringQuery) MarshalJSON ¶
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 ¶
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 ¶
NewTermFacet creates a new TermFacet
func (TermFacet) MarshalJSON ¶
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 (TermQuery) MarshalJSON ¶
MarshalJSON marshal's this query to JSON for the FTS REST API.
func (*TermQuery) PrefixLength ¶
PrefixLength specifies the prefix length from this 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 ¶
MarshalJSON marshal's this query to JSON for the FTS REST API.