bleve

package
v0.0.0-...-5379d26 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSegoChineseAnalyzer

func AddSegoChineseAnalyzer(indexMapping *mapping.IndexMappingImpl) error

func GetDateTime

func GetDateTime(f index.Field) time.Time

func New

func New(name string, analyzer string) (*bleveIndexer, error)

New creates a new instance for this indexer

func SegoTokenizerConstructor

func SegoTokenizerConstructor(config map[string]interface{}, cache *registry.Cache) (analysis.Tokenizer, error)

Types

type Record

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

Record handles indexer's data

func (*Record) Body

func (r *Record) Body() []byte

Body returns Record's body

func (*Record) FullPath

func (r *Record) FullPath() string

FullPath returns Record's fullpath

func (*Record) Ignore

func (r *Record) Ignore()

Ignore flag this record as ignored

func (*Record) Ignored

func (r *Record) Ignored() bool

Ignored returns if this record is ignored

func (*Record) Indexed

func (r *Record) Indexed() time.Time

Indexed returns the indexing time (if indexed)

func (*Record) Load

func (r *Record) Load() bool

Load this record from the indexer.

func (*Record) MimeType

func (r *Record) MimeType() string

func (*Record) Modified

func (r *Record) Modified() time.Time

Modified returns Record's Modified

func (*Record) Path

func (r *Record) Path() string

Path returns Record's path

func (*Record) SetBody

func (r *Record) SetBody(body []byte)

SetBody replaces the actual body

func (*Record) SetFullPath

func (r *Record) SetFullPath(fp string)

SetFullPath defines a new fullpath for the record

func (*Record) SetIndexed

func (r *Record) SetIndexed(index time.Time)

SetIndexed define the time that this record has been indexed

func (*Record) SetMimeType

func (r *Record) SetMimeType(val string)

func (*Record) SetModified

func (r *Record) SetModified(mod time.Time)

SetModified defines new modification time for this record

func (*Record) SetTitle

func (r *Record) SetTitle(title string)

SetTitle replaces Record's title

func (*Record) Title

func (r *Record) Title() string

Title returns Record's title

func (*Record) Write

func (r *Record) Write(p []byte) (int, error)

Write is the writing method for a Record

type SegoTokenizer

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

SegoTokenizer is the beleve tokenizer for jiebago.

func (*SegoTokenizer) Tokenize

func (seg *SegoTokenizer) Tokenize(input []byte) analysis.TokenStream

Tokenize cuts input into bleve token stream.

Directories

Path Synopsis
Go中文分词
Go中文分词

Jump to

Keyboard shortcuts

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