a

package
v0.0.0-...-a4a9cab Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sample

type Sample struct {
	Foo string
}

func (*Sample) Searchfy

func (src *Sample) Searchfy() (*SampleSearch, error)

Searchfy converts *Sample to *SampleSearch.

type SampleSearch

type SampleSearch struct {
	Foo string
	// contains filtered or unexported fields
}

SampleSearch best match Search API wrapper for Sample.

type SampleSearchBoolPropertyInfo

type SampleSearchBoolPropertyInfo struct {
	Name string
	// contains filtered or unexported fields
}

SampleSearchBoolPropertyInfo hold property info.

type SampleSearchBuilder

type SampleSearchBuilder struct {
	Foo *SampleSearchStringPropertyInfo
	// contains filtered or unexported fields
}

SampleSearchBuilder builds Search API query.

func NewSampleSearch

func NewSampleSearch() *SampleSearchBuilder

NewSampleSearch create new *SampleSearchBuilder.

func NewSampleSearchWithIndexName

func NewSampleSearchWithIndexName(name string) *SampleSearchBuilder

NewSampleSearchWithIndexName create new *SampleSearchBuilder with specified Index name. Should use with auto-fixed val like UserID, to avoid typo

func (*SampleSearchBuilder) And

And append new operant to query.

func (*SampleSearchBuilder) Delete

func (b *SampleSearchBuilder) Delete(c context.Context, src *Sample) error

Delete document from Index.

func (*SampleSearchBuilder) DeleteByDocID

func (b *SampleSearchBuilder) DeleteByDocID(c context.Context, docID string) error

DeleteByDocID from Index.

func (*SampleSearchBuilder) DeleteDocument

func (b *SampleSearchBuilder) DeleteDocument(c context.Context, src *SampleSearch) error

DeleteDocument from Index.

func (*SampleSearchBuilder) DeleteDocumentMulti

func (b *SampleSearchBuilder) DeleteDocumentMulti(c context.Context, srcs []*SampleSearch) error

DeleteDocumentMulti from Index.

func (*SampleSearchBuilder) DeleteMulti

func (b *SampleSearchBuilder) DeleteMulti(c context.Context, srcs []*Sample) error

DeleteMulti documents from Index.

func (*SampleSearchBuilder) DeleteMultiByDocIDs

func (b *SampleSearchBuilder) DeleteMultiByDocIDs(c context.Context, docIDs []string) error

DeleteMultiByDocIDs from Index.

func (*SampleSearchBuilder) EndGroup

EndGroup append new operant to query.

func (*SampleSearchBuilder) Group

func (b *SampleSearchBuilder) Group(p func()) *SampleSearchBuilder

Group append new operant to query.

func (*SampleSearchBuilder) IndexName

func (b *SampleSearchBuilder) IndexName() string

IndexName returns name of target index.

func (*SampleSearchBuilder) Opts

Opts returns *SampleSearchOptions.

func (*SampleSearchBuilder) Or

Or append new operant to query.

func (*SampleSearchBuilder) Put

Put document to Index.

func (*SampleSearchBuilder) PutDocument

func (b *SampleSearchBuilder) PutDocument(c context.Context, src *SampleSearch) (string, error)

PutDocument to Index

func (*SampleSearchBuilder) PutDocumentMulti

func (b *SampleSearchBuilder) PutDocumentMulti(c context.Context, srcs []*SampleSearch) ([]string, error)

PutDocumentMulti to Index.

func (*SampleSearchBuilder) PutMulti

func (b *SampleSearchBuilder) PutMulti(c context.Context, srcs []*Sample) ([]string, error)

PutMulti documents to Index.

func (*SampleSearchBuilder) QueryString

func (b *SampleSearchBuilder) QueryString() (string, error)

QueryString returns query string.

func (*SampleSearchBuilder) Search

Search returns *SampleSearchIterator, It is result from Index.

func (*SampleSearchBuilder) SearchOptions

func (b *SampleSearchBuilder) SearchOptions() *search.SearchOptions

SearchOptions returns search options.

func (*SampleSearchBuilder) StartGroup

func (b *SampleSearchBuilder) StartGroup() *SampleSearchBuilder

StartGroup append new operant to query.

type SampleSearchIterator

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

SampleSearchIterator can access to search result.

func (*SampleSearchIterator) Cursor

func (b *SampleSearchIterator) Cursor() search.Cursor

Cursor returns cursor of search.

func (*SampleSearchIterator) Next

Next returns next document from iter.

type SampleSearchNgramStringPropertyInfo

type SampleSearchNgramStringPropertyInfo struct {
	SampleSearchStringPropertyInfo
}

SampleSearchNgramStringPropertyInfo hold property info.

func (*SampleSearchNgramStringPropertyInfo) NgramMatch

NgramMatch add query operand.

type SampleSearchNumberPropertyInfo

type SampleSearchNumberPropertyInfo struct {
	Name string
	// contains filtered or unexported fields
}

SampleSearchNumberPropertyInfo hold property info.

func (*SampleSearchNumberPropertyInfo) Asc

Asc add query operand.

func (*SampleSearchNumberPropertyInfo) Desc

Desc add query operand.

func (*SampleSearchNumberPropertyInfo) Equal

Equal add query operand.

func (*SampleSearchNumberPropertyInfo) Int64Equal

Int64Equal add query operand.

func (*SampleSearchNumberPropertyInfo) Int64GreaterThan

func (p *SampleSearchNumberPropertyInfo) Int64GreaterThan(value int64) *SampleSearchBuilder

Int64GreaterThan add query operand.

func (*SampleSearchNumberPropertyInfo) Int64GreaterThanOrEqual

func (p *SampleSearchNumberPropertyInfo) Int64GreaterThanOrEqual(value int64) *SampleSearchBuilder

Int64GreaterThanOrEqual add query operand.

func (*SampleSearchNumberPropertyInfo) Int64LessThan

func (p *SampleSearchNumberPropertyInfo) Int64LessThan(value int64) *SampleSearchBuilder

Int64LessThan add query operand.

func (*SampleSearchNumberPropertyInfo) Int64LessThanOrEqual

func (p *SampleSearchNumberPropertyInfo) Int64LessThanOrEqual(value int64) *SampleSearchBuilder

Int64LessThanOrEqual add query operand.

func (*SampleSearchNumberPropertyInfo) IntEqual

IntEqual add query operand.

func (*SampleSearchNumberPropertyInfo) IntGreaterThan

func (p *SampleSearchNumberPropertyInfo) IntGreaterThan(value int) *SampleSearchBuilder

IntGreaterThan add query operand.

func (*SampleSearchNumberPropertyInfo) IntGreaterThanOrEqual

func (p *SampleSearchNumberPropertyInfo) IntGreaterThanOrEqual(value int) *SampleSearchBuilder

IntGreaterThanOrEqual add query operand.

func (*SampleSearchNumberPropertyInfo) IntLessThan

IntLessThan add query operand.

func (*SampleSearchNumberPropertyInfo) IntLessThanOrEqual

func (p *SampleSearchNumberPropertyInfo) IntLessThanOrEqual(value int) *SampleSearchBuilder

IntLessThanOrEqual add query operand.

type SampleSearchOptions

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

SampleSearchOptions construct *search.SearchOptions.

func (*SampleSearchOptions) Cursor

Cursor setup opts.

func (*SampleSearchOptions) IDsOnly

IDsOnly setup opts.

func (*SampleSearchOptions) Limit

func (b *SampleSearchOptions) Limit(value int) *SampleSearchOptions

Limit setup opts.

func (*SampleSearchOptions) Offset

func (b *SampleSearchOptions) Offset(value int) *SampleSearchOptions

Offset setup opts.

type SampleSearchStringPropertyInfo

type SampleSearchStringPropertyInfo struct {
	Name string
	// contains filtered or unexported fields
}

SampleSearchStringPropertyInfo hold property info.

func (*SampleSearchStringPropertyInfo) Asc

Asc add query operand.

func (*SampleSearchStringPropertyInfo) Desc

Desc add query operand.

func (*SampleSearchStringPropertyInfo) Match

Match add query operand.

type SampleSearchTimePropertyInfo

type SampleSearchTimePropertyInfo struct {
	Name string
	// contains filtered or unexported fields
}

SampleSearchTimePropertyInfo hold property info.

func (*SampleSearchTimePropertyInfo) Asc

Asc add query operand.

func (*SampleSearchTimePropertyInfo) Desc

Desc add query operand.

func (*SampleSearchTimePropertyInfo) Equal

Equal add query operand.

func (*SampleSearchTimePropertyInfo) GreaterThan

GreaterThan add query operand.

func (*SampleSearchTimePropertyInfo) GreaterThanOrEqual

func (p *SampleSearchTimePropertyInfo) GreaterThanOrEqual(value time.Time) *SampleSearchBuilder

GreaterThanOrEqual add query operand.

func (*SampleSearchTimePropertyInfo) LessThan

LessThan add query operand.

func (*SampleSearchTimePropertyInfo) LessThanOrEqual

func (p *SampleSearchTimePropertyInfo) LessThanOrEqual(value time.Time) *SampleSearchBuilder

LessThanOrEqual add query operand.

type SampleSearchUnixTimePropertyInfo

type SampleSearchUnixTimePropertyInfo struct {
	Name string
	// contains filtered or unexported fields
}

SampleSearchUnixTimePropertyInfo hold property info.

func (*SampleSearchUnixTimePropertyInfo) Asc

Asc add query operand.

func (*SampleSearchUnixTimePropertyInfo) Desc

Desc add query operand.

func (*SampleSearchUnixTimePropertyInfo) Equal

Equal add query operand.

func (*SampleSearchUnixTimePropertyInfo) GreaterThan

GreaterThan add query operand.

func (*SampleSearchUnixTimePropertyInfo) GreaterThanOrEqual

func (p *SampleSearchUnixTimePropertyInfo) GreaterThanOrEqual(value time.Time) *SampleSearchBuilder

GreaterThanOrEqual add query operand.

func (*SampleSearchUnixTimePropertyInfo) LessThan

LessThan add query operand.

func (*SampleSearchUnixTimePropertyInfo) LessThanOrEqual

LessThanOrEqual add query operand.

func (*SampleSearchUnixTimePropertyInfo) UnixTimeAsc

UnixTimeAsc add query operand.

func (*SampleSearchUnixTimePropertyInfo) UnixTimeDesc

UnixTimeDesc add query operand.

func (*SampleSearchUnixTimePropertyInfo) UnixTimeEqual

UnixTimeEqual add query operand.

func (*SampleSearchUnixTimePropertyInfo) UnixTimeGreaterThan

func (p *SampleSearchUnixTimePropertyInfo) UnixTimeGreaterThan(value time.Time) *SampleSearchBuilder

UnixTimeGreaterThan add query operand.

func (*SampleSearchUnixTimePropertyInfo) UnixTimeGreaterThanOrEqual

func (p *SampleSearchUnixTimePropertyInfo) UnixTimeGreaterThanOrEqual(value time.Time) *SampleSearchBuilder

UnixTimeGreaterThanOrEqual add query operand.

func (*SampleSearchUnixTimePropertyInfo) UnixTimeLessThan

func (p *SampleSearchUnixTimePropertyInfo) UnixTimeLessThan(value time.Time) *SampleSearchBuilder

UnixTimeLessThan add query operand.

func (*SampleSearchUnixTimePropertyInfo) UnixTimeLessThanOrEqual

func (p *SampleSearchUnixTimePropertyInfo) UnixTimeLessThanOrEqual(value time.Time) *SampleSearchBuilder

UnixTimeLessThanOrEqual add query operand.

Jump to

Keyboard shortcuts

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