indexer

package
v0.0.0-...-44e12ef Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const StopWords = "" /* 903-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	URL   string `json:"u"`
	Title string `json:"t"`
	// contains filtered or unexported fields
}

type Index

type Index struct {
	Docs  []*Document              `json:"docs"`
	Words map[string][]interface{} `json:"words"`

	ContentWordWeight      float64 `json:"-"`
	HTMLTitleWeight        float64 `json:"-"`
	HTMLURLComponentWeight float64 `json:"-"`
	// contains filtered or unexported fields
}

func New

func New() *Index

func (*Index) AddHTML

func (n *Index) AddHTML(url string, r io.Reader) (indexed bool, err error)

func (*Index) AddText

func (n *Index) AddText(url, title string, r io.Reader) error

func (*Index) WriteJSON

func (n *Index) WriteJSON(w io.Writer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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