Documentation ¶
Index ¶
- func Marshal(q search.Query) ([]byte, error)
- func MustCreateRegexpQuery(field, regexp []byte) search.Query
- func NewConjunctionQuery(queries []search.Query) search.Query
- func NewDisjunctionQuery(queries []search.Query) search.Query
- func NewNegationQuery(q search.Query) search.Query
- func NewRegexpQuery(field, regexp []byte) (search.Query, error)
- func NewTermQuery(field, term []byte) search.Query
- func Unmarshal(data []byte) (search.Query, error)
- type ConjuctionQuery
- type DisjuctionQuery
- type NegationQuery
- type RegexpQuery
- type TermQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustCreateRegexpQuery ¶
MustCreateRegexpQuery is like NewRegexpQuery but panics if the query cannot be created.
func NewConjunctionQuery ¶
NewConjunctionQuery constructs a new query which matches documents which match all of the given queries.
func NewDisjunctionQuery ¶
NewDisjunctionQuery constructs a new query which matches documents that match any of the given queries.
func NewNegationQuery ¶
NewNegationQuery constructs a new NegationQuery for the given query.
func NewRegexpQuery ¶
NewRegexpQuery constructs a new query for the given regular expression.
func NewTermQuery ¶
NewTermQuery constructs a new TermQuery for the given field and term.
Types ¶
type ConjuctionQuery ¶
type ConjuctionQuery struct {
// contains filtered or unexported fields
}
ConjuctionQuery finds documents which match at least one of the given queries.
func (*ConjuctionQuery) Equal ¶
func (q *ConjuctionQuery) Equal(o search.Query) bool
Equal reports whether q is equivalent to o.
func (*ConjuctionQuery) Searcher ¶
func (q *ConjuctionQuery) Searcher() (search.Searcher, error)
Searcher returns a searcher over the provided readers.
func (*ConjuctionQuery) String ¶
func (q *ConjuctionQuery) String() string
func (*ConjuctionQuery) ToProto ¶
func (q *ConjuctionQuery) ToProto() *querypb.Query
ToProto returns the Protobuf query struct corresponding to the conjunction query.
type DisjuctionQuery ¶
type DisjuctionQuery struct {
// contains filtered or unexported fields
}
DisjuctionQuery finds documents which match at least one of the given queries.
func (*DisjuctionQuery) Equal ¶
func (q *DisjuctionQuery) Equal(o search.Query) bool
Equal reports whether q is equivalent to o.
func (*DisjuctionQuery) Searcher ¶
func (q *DisjuctionQuery) Searcher() (search.Searcher, error)
Searcher returns a searcher over the provided readers.
func (*DisjuctionQuery) String ¶
func (q *DisjuctionQuery) String() string
func (*DisjuctionQuery) ToProto ¶
func (q *DisjuctionQuery) ToProto() *querypb.Query
ToProto returns the Protobuf query struct corresponding to the disjunction query.
type NegationQuery ¶
type NegationQuery struct {
// contains filtered or unexported fields
}
NegationQuery finds document which do not match a given query.
func (*NegationQuery) Equal ¶
func (q *NegationQuery) Equal(o search.Query) bool
Equal reports whether q is equivalent to o.
func (*NegationQuery) Searcher ¶
func (q *NegationQuery) Searcher() (search.Searcher, error)
Searcher returns a searcher over the provided readers.
func (*NegationQuery) String ¶
func (q *NegationQuery) String() string
func (*NegationQuery) ToProto ¶
func (q *NegationQuery) ToProto() *querypb.Query
ToProto returns the Protobuf query struct corresponding to the term query.
type RegexpQuery ¶
type RegexpQuery struct {
// contains filtered or unexported fields
}
RegexpQuery finds documents which match the given regular expression.
func (*RegexpQuery) Equal ¶
func (q *RegexpQuery) Equal(o search.Query) bool
Equal reports whether q is equivalent to o.
func (*RegexpQuery) Searcher ¶
func (q *RegexpQuery) Searcher() (search.Searcher, error)
Searcher returns a searcher over the provided readers.
func (*RegexpQuery) String ¶
func (q *RegexpQuery) String() string
func (*RegexpQuery) ToProto ¶
func (q *RegexpQuery) ToProto() *querypb.Query
ToProto returns the Protobuf query struct corresponding to the regexp query.