searchengine

package
v0.0.0-...-3312965 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NO_SUBCOMMAND = iota
	NO_PATH_TO_INDEX
	UNKOWN_SUBCOMMAND
	TOTAL_ERRORS
)

Variables

This section is empty.

Functions

func PrintErrorToUser

func PrintErrorToUser(errorType int)

func PrintUsage

func PrintUsage()

Types

type Command

type Command struct {
	Subcommand string
	Path       string
}

func (Command) HandleCommand

func (c Command) HandleCommand()

type DocumentFrequency

type DocumentFrequency struct {
	// each term and number of documents appear in
	Value map[string]int
	// total document
	Size int
}

type FileData

type FileData struct {
	// terms ferq in doc
	Terms TermsFrequency
	// doc title
	Title string
	// number of terms in the doc
	DocSize int
	// last update time
	LastUpdateTime time.Time
}

type FileInfo

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

type FilesInfo

type FilesInfo = map[string]FileInfo

type FilesRank

type FilesRank = map[string]float64

type FilesTermsFrequency

type FilesTermsFrequency = map[string]FileData

type InMemoryData

type InMemoryData struct {
	Ftf FilesTermsFrequency
	Df  DocumentFrequency
}

type PaginationInfo

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

type Pair

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

type Pairs

type Pairs []Pair

func (Pairs) Len

func (p Pairs) Len() int

func (Pairs) Less

func (p Pairs) Less(i, j int) bool

func (Pairs) Swap

func (p Pairs) Swap(i, j int)

type ResponseType

type ResponseType struct {
	Result         []ResultType
	IsCompleteData bool
}

type ResultType

type ResultType struct {
	Path  string
	Title string
}

type SearchQuery

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

type TermsFrequency

type TermsFrequency = map[string]int

Jump to

Keyboard shortcuts

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