Versions in this module Expand all Collapse all v0 v0.5.0 Sep 28, 2016 Changes in this version type Index + func NewMemOnly(mapping *IndexMapping) (Index, error) v0.4.0 Sep 12, 2016 Changes in this version + const MatchQueryOperatorAnd + const MatchQueryOperatorOr + func NewMatchQueryOperator(match string, operator MatchQueryOperator) *matchQuery + type MatchQueryOperator int + func (o *MatchQueryOperator) UnmarshalJSON(data []byte) error + func (o MatchQueryOperator) MarshalJSON() ([]byte, error) type SearchRequest + Sort search.SortOrder + func (r *SearchRequest) SortBy(order []string) + func (r *SearchRequest) SortByCustom(order search.SortOrder) v0.3.0 Jun 16, 2016 Changes in this version type FacetRequest + func (fr *FacetRequest) Validate() error type FacetsRequest + func (fr FacetsRequest) Validate() error type IndexErrMap + func (iem IndexErrMap) UnmarshalJSON(data []byte) error type SearchRequest + func (sr *SearchRequest) Validate() error v0.2.0 Apr 8, 2016 v0.1.0 Apr 8, 2016 Changes in this version + var Config *configuration + var IndexDynamic = true + var MappingJSONStrict = false + var StoreDynamic = true + func DumpQuery(m *IndexMapping, query Query) (string, error) + func NewBoolFieldQuery(val bool) *boolFieldQuery + func NewBooleanQuery(must []Query, should []Query, mustNot []Query) *booleanQuery + func NewBooleanQueryMinShould(must []Query, should []Query, mustNot []Query, minShould float64) *booleanQuery + func NewConjunctionQuery(conjuncts []Query) *conjunctionQuery + func NewDateRangeInclusiveQuery(start, end *string, startInclusive, endInclusive *bool) *dateRangeQuery + func NewDateRangeQuery(start, end *string) *dateRangeQuery + func NewDisjunctionQuery(disjuncts []Query) *disjunctionQuery + func NewDisjunctionQueryMin(disjuncts []Query, min float64) *disjunctionQuery + func NewDocIDQuery(ids []string) *docIDQuery + func NewFuzzyQuery(term string) *fuzzyQuery + func NewIndexAlias(indexes ...Index) *indexAliasImpl + func NewMatchAllQuery() *matchAllQuery + func NewMatchNoneQuery() *matchNoneQuery + func NewMatchPhraseQuery(matchPhrase string) *matchPhraseQuery + func NewMatchQuery(match string) *matchQuery + func NewNumericRangeInclusiveQuery(min, max *float64, minInclusive, maxInclusive *bool) *numericRangeQuery + func NewNumericRangeQuery(min, max *float64) *numericRangeQuery + func NewPhraseQuery(terms []string, field string) *phraseQuery + func NewPrefixQuery(prefix string) *prefixQuery + func NewQueryStringQuery(query string) *queryStringQuery + func NewRegexpQuery(regexp string) *regexpQuery + func NewTermQuery(term string) *termQuery + func NewWildcardQuery(wildcard string) *wildcardQuery + func SetLog(l *log.Logger) + type Batch struct + func (b *Batch) Delete(id string) + func (b *Batch) DeleteInternal(key []byte) + func (b *Batch) Index(id string, data interface{}) error + func (b *Batch) Reset() + func (b *Batch) SetInternal(key, val []byte) + func (b *Batch) Size() int + func (b *Batch) String() string + type Classifier interface + Type func() string + type DocumentMapping struct + DefaultAnalyzer string + Dynamic bool + Enabled bool + Fields []*FieldMapping + Properties map[string]*DocumentMapping + func NewDocumentDisabledMapping() *DocumentMapping + func NewDocumentMapping() *DocumentMapping + func NewDocumentStaticMapping() *DocumentMapping + func (dm *DocumentMapping) AddFieldMapping(fm *FieldMapping) + func (dm *DocumentMapping) AddFieldMappingsAt(property string, fms ...*FieldMapping) + func (dm *DocumentMapping) AddSubDocumentMapping(property string, sdm *DocumentMapping) + func (dm *DocumentMapping) UnmarshalJSON(data []byte) error + func (dm *DocumentMapping) Validate(cache *registry.Cache) error + type Error int + const ErrorAliasEmpty + const ErrorAliasMulti + const ErrorBooleanQueryNeedsMustOrShouldOrNotMust + const ErrorDisjunctionFewerThanMinClauses + const ErrorEmptyID + const ErrorIndexClosed + const ErrorIndexMetaCorrupt + const ErrorIndexMetaMissing + const ErrorIndexPathDoesNotExist + const ErrorIndexPathExists + const ErrorIndexReadInconsistency + const ErrorNumericQueryNoBounds + const ErrorPhraseQueryNoTerms + const ErrorUnknownIndexType + const ErrorUnknownQueryType + const ErrorUnknownStorageType + func (e Error) Error() string + type FacetRequest struct + DateTimeRanges []*dateTimeRange + Field string + NumericRanges []*numericRange + Size int + func NewFacetRequest(field string, size int) *FacetRequest + func (fr *FacetRequest) AddDateTimeRange(name string, start, end time.Time) + func (fr *FacetRequest) AddNumericRange(name string, min, max *float64) + type FacetsRequest map[string]*FacetRequest + type FieldMapping struct + Analyzer string + DateFormat string + IncludeInAll bool + IncludeTermVectors bool + Index bool + Name string + Store bool + Type string + func NewBooleanFieldMapping() *FieldMapping + func NewDateTimeFieldMapping() *FieldMapping + func NewNumericFieldMapping() *FieldMapping + func NewTextFieldMapping() *FieldMapping + func (fm *FieldMapping) Options() document.IndexingOptions + func (fm *FieldMapping) UnmarshalJSON(data []byte) error + type HighlightRequest struct + Fields []string + Style *string + func NewHighlight() *HighlightRequest + func NewHighlightWithStyle(style string) *HighlightRequest + func (h *HighlightRequest) AddField(field string) + type Index interface + Advanced func() (index.Index, store.KVStore, error) + Batch func(b *Batch) error + Close func() error + Delete func(id string) error + DeleteInternal func(key []byte) error + DocCount func() (uint64, error) + Document func(id string) (*document.Document, error) + DumpAll func() chan interface{} + DumpDoc func(id string) chan interface{} + DumpFields func() chan interface{} + FieldDict func(field string) (index.FieldDict, error) + FieldDictPrefix func(field string, termPrefix []byte) (index.FieldDict, error) + FieldDictRange func(field string, startTerm []byte, endTerm []byte) (index.FieldDict, error) + Fields func() ([]string, error) + GetInternal func(key []byte) ([]byte, error) + Index func(id string, data interface{}) error + Mapping func() *IndexMapping + Name func() string + NewBatch func() *Batch + Search func(req *SearchRequest) (*SearchResult, error) + SearchInContext func(ctx context.Context, req *SearchRequest) (*SearchResult, error) + SetInternal func(key, val []byte) error + SetName func(string) + Stats func() *IndexStat + StatsMap func() map[string]interface{} + func New(path string, mapping *IndexMapping) (Index, error) + func NewUsing(path string, mapping *IndexMapping, indexType string, kvstore string, ...) (Index, error) + func Open(path string) (Index, error) + func OpenUsing(path string, runtimeConfig map[string]interface{}) (Index, error) + type IndexAlias interface + Add func(i ...Index) + Remove func(i ...Index) + Swap func(in, out []Index) + type IndexErrMap map[string]error + func (iem IndexErrMap) MarshalJSON() ([]byte, error) + type IndexMapping struct + ByteArrayConverter string + CustomAnalysis *customAnalysis + DefaultAnalyzer string + DefaultDateTimeParser string + DefaultField string + DefaultMapping *DocumentMapping + DefaultType string + IndexDynamic bool + StoreDynamic bool + TypeField string + TypeMapping map[string]*DocumentMapping + func NewIndexMapping() *IndexMapping + func (im *IndexMapping) AddCustomAnalyzer(name string, config map[string]interface{}) error + func (im *IndexMapping) AddCustomCharFilter(name string, config map[string]interface{}) error + func (im *IndexMapping) AddCustomDateTimeParser(name string, config map[string]interface{}) error + func (im *IndexMapping) AddCustomTokenFilter(name string, config map[string]interface{}) error + func (im *IndexMapping) AddCustomTokenMap(name string, config map[string]interface{}) error + func (im *IndexMapping) AddCustomTokenizer(name string, config map[string]interface{}) error + func (im *IndexMapping) AddDocumentMapping(doctype string, dm *DocumentMapping) + func (im *IndexMapping) AnalyzeText(analyzerName string, text []byte) (analysis.TokenStream, error) + func (im *IndexMapping) FieldAnalyzer(field string) string + func (im *IndexMapping) UnmarshalJSON(data []byte) error + func (im *IndexMapping) Validate() error + type IndexStat struct + func (is *IndexStat) MarshalJSON() ([]byte, error) + type IndexStats struct + func NewIndexStats() *IndexStats + func (i *IndexStats) Register(index Index) + func (i *IndexStats) String() string + func (i *IndexStats) UnRegister(index Index) + type Query interface + Boost func() float64 + Field func() string + Searcher func(i index.IndexReader, m *IndexMapping, explain bool) (search.Searcher, error) + SetBoost func(b float64) Query + SetField func(f string) Query + Validate func() error + func ParseQuery(input []byte) (Query, error) + type SearchRequest struct + Explain bool + Facets FacetsRequest + Fields []string + From int + Highlight *HighlightRequest + Query Query + Size int + func NewSearchRequest(q Query) *SearchRequest + func NewSearchRequestOptions(q Query, size, from int, explain bool) *SearchRequest + func (r *SearchRequest) AddFacet(facetName string, f *FacetRequest) + func (r *SearchRequest) UnmarshalJSON(input []byte) error + type SearchResult struct + Facets search.FacetResults + Hits search.DocumentMatchCollection + MaxScore float64 + Request *SearchRequest + Status *SearchStatus + Took time.Duration + Total uint64 + func MultiSearch(ctx context.Context, req *SearchRequest, indexes ...Index) (*SearchResult, error) + func (sr *SearchResult) Merge(other *SearchResult) + func (sr *SearchResult) String() string + type SearchStatus struct + Errors IndexErrMap + Failed int + Successful int + Total int + func (ss *SearchStatus) Merge(other *SearchStatus)