search

package
v0.0.0-...-d3e7db7 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunEngine

func RunEngine(
	sss *services.SearchSettingsServices, us *services.UrlServices,
)

Types

type CrawlData

type CrawlData struct {
	ID           string
	Url          string
	Success      bool
	ResponseCode int
	CrawlBody    ParsedBody
}

type Index

type Index map[string][]string

Index is an in-memory inverted index. It maps tokens to url IDs.

func (Index) Add

func (idx Index) Add(docs []services.CrawledUrl)

Add adds documents to the Index.

type Links struct {
	Internal []string
	External []string
}

type ParsedBody

type ParsedBody struct {
	CrawlTime       time.Duration
	PageTitle       string
	PageDescription string
	Headings        string
	Links           Links
}

Jump to

Keyboard shortcuts

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