Documentation
¶
Index ¶
- Constants
- func GetSearchResults[T any](searchResult *SearchResult, schema *Schema, f func(json string) (T, error), ...) ([]T, error)
- func LibInit(directive ...string) error
- func ToModel[T any](doc *Document, schema *Schema, includeFields []string, ...) (T, error)
- type Document
- type Index
- func (i *Index) AddAndConsumeDocuments(docs ...*Document) error
- func (i *Index) DeleteDocuments(field string, deleteIds ...string) error
- func (i *Index) Free()
- func (i *Index) NumDocs() (uint64, error)
- func (i *Index) RegisterTextAnalyzerEdgeNgram(tokenizerName string, minGram, maxGram uintptr, limit uintptr) error
- func (i *Index) RegisterTextAnalyzerNgram(tokenizerName string, minGram, maxGram uintptr, prefixOnly bool) error
- func (i *Index) RegisterTextAnalyzerRaw(tokenizerName string) error
- func (i *Index) RegisterTextAnalyzerSimple(tokenizerName string, textLimit uintptr, lang string) error
- func (i *Index) Search(query string, docsLimit uintptr, withHighlights bool, fieldNames ...string) (*SearchResult, error)
- type Schema
- type SchemaBuilder
- type SearchResult
Constants ¶
View Source
const ( IndexRecordOptionBasic = iota IndexRecordOptionWithFreqs IndexRecordOptionWithFreqsAndPositions )
View Source
const ( Arabic = "ar" Danish = "da" Dutch = "nl" English = "en" Finnish = "fi" French = "fr" German = "de" Greek = "el" Hungarian = "hu" Italian = "it" Norwegian = "no" Portuguese = "pt" Romanian = "ro" Russian = "ru" Spanish = "es" Swedish = "sv" Tamil = "ta" Turkish = "tr" )
View Source
const DefaultTokenizer = "default"
View Source
const TokenizerEdgeNgram = "edge_ngram"
View Source
const TokenizerNgram = "ngram"
View Source
const TokenizerRaw = "raw"
View Source
const TokenizerSimple = "simple"
Variables ¶
This section is empty.
Functions ¶
func GetSearchResults ¶
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func NewDocument ¶
func NewDocument() *Document
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func (*Index) AddAndConsumeDocuments ¶
func (*Index) DeleteDocuments ¶
func (*Index) RegisterTextAnalyzerEdgeNgram ¶
func (*Index) RegisterTextAnalyzerNgram ¶
func (*Index) RegisterTextAnalyzerRaw ¶
func (*Index) RegisterTextAnalyzerSimple ¶
type SchemaBuilder ¶
type SchemaBuilder struct {
// contains filtered or unexported fields
}
func NewSchemaBuilder ¶
func NewSchemaBuilder() (*SchemaBuilder, error)
func (*SchemaBuilder) AddTextField ¶
func (*SchemaBuilder) BuildSchema ¶
func (b *SchemaBuilder) BuildSchema() (*Schema, error)
type SearchResult ¶
type SearchResult struct {
// contains filtered or unexported fields
}
func (*SearchResult) Free ¶
func (r *SearchResult) Free()
func (*SearchResult) GetSize ¶
func (r *SearchResult) GetSize() (uint64, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.