search

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultTextFieldMapping

func NewDefaultTextFieldMapping(analyzer string) (f *mapping.FieldMapping)

func NewDocumentMapping

func NewDocumentMapping(tag language.Tag) (analyzer string, dm *mapping.DocumentMapping)

func NewIndexMapping

func NewIndexMapping(tag language.Tag) (indexMapping *mapping.IndexMappingImpl)

func NewMemOnlyIndexWithDocMaps

func NewMemOnlyIndexWithDocMaps(tag language.Tag, docMaps map[string]*mapping.DocumentMapping) (index bleve.Index, err error)

Types

type CDocument

type CDocument struct {
	Type     string   `json:"type"`
	Url      string   `json:"url"`
	Title    string   `json:"title"`
	Language string   `json:"language"`
	Contents []string `json:"contents"`
}

func NewDocument

func NewDocument(language, url, title string) (doc *CDocument)

func (*CDocument) AddContent

func (d *CDocument) AddContent(text string)

func (*CDocument) BleveType

func (d *CDocument) BleveType() string

func (*CDocument) GetContents

func (d *CDocument) GetContents() (contents []string)

func (*CDocument) GetLanguage

func (d *CDocument) GetLanguage() (language string)

func (*CDocument) GetTitle

func (d *CDocument) GetTitle() (title string)

func (*CDocument) GetUrl

func (d *CDocument) GetUrl() (url string)

func (*CDocument) Self

func (d *CDocument) Self() interface{}

type Document

type Document interface {
	Self() interface{}
	GetUrl() (url string)
	GetTitle() (title string)
	GetLanguage() (language string)
	GetContents() (contents []string)
	BleveType() string
	AddContent(text string)
}

Jump to

Keyboard shortcuts

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