Documentation ¶
Index ¶
- type BooleanQuery
- type Expr
- func (x *Expr) Filter(q ...Rule) *Expr
- func (x *Expr) MarshalCQL(_ gocql.TypeInfo) ([]byte, error)
- func (x *Expr) Query(q ...Rule) *Expr
- func (x *Expr) Refresh(e bool) *Expr
- func (x *Expr) Reset() *Expr
- func (x *Expr) ResetFilter() *Expr
- func (x *Expr) ResetQuery() *Expr
- func (x *Expr) ResetSort() *Expr
- func (x *Expr) SortBy(f string, r bool) *Expr
- func (x *Expr) String() string
- type Rule
- func All() Rule
- func BooleanMust(rs ...Rule) Rule
- func BooleanNot(rs ...Rule) Rule
- func BooleanShould(rs ...Rule) Rule
- func Contains(f string, v interface{}) Rule
- func Fuzzy(f string, v interface{}) Rule
- func Match(f string, v interface{}) Rule
- func Phrase(f string, v interface{}, slop int) Rule
- func Prefix(f string, v interface{}) Rule
- func RangeAll(f string, lv, uv interface{}, incl, incu bool) Rule
- func RangeLower(f string, v interface{}, inc bool) Rule
- func RangeUpper(f string, v interface{}, inc bool) Rule
- func Regexp(f string, v string) Rule
- func Wildcard(f string, v string) Rule
- type Sort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BooleanQuery ¶
type BooleanQuery struct { Type string `json:"type"` Must []Rule `json:"must,omitempty"` Should []Rule `json:"should,omitempty"` Not []Rule `json:"not,omitempty"` }
BooleanQuery struct
type Expr ¶
type Expr struct { Q []Rule `json:"query,omitempty"` F []Rule `json:"filter,omitempty"` S []*Sort `json:"sort,omitempty"` R bool `json:"refresh,omitempty"` }
func (*Expr) MarshalCQL ¶
MarshalCQL enables gocql library marshal into cql
func (*Expr) ResetFilter ¶
ResetFilter removes pre-configured filter expression
func (*Expr) ResetQuery ¶
ResetQuery removes pre-configured query expression
type Rule ¶
type Rule interface { }
func Fuzzy ¶
Fuzzy query https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#fuzzy-search
func Phrase ¶
Phrase query see: https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.10/doc/documentation.rst#phrase-search slop (default = 0): number of words permitted between words.
Click to show internal directories.
Click to hide internal directories.