backend

package
v0.0.0-...-c34d6d1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewEntryToLocalData

func AddNewEntryToLocalData(data schema.Data)

func Analyze

func Analyze(source string) []string

func GetRecordFromData

func GetRecordFromData(currData schema.Data, uniqueID string) schema.Record

func InitializeFilesAndData

func InitializeFilesAndData()

helper function which should be called when the program is initialized so that the necessary files and paths exist in our database

func RefreshInvertedIndex

func RefreshInvertedIndex()

highest-level function that is called at regular intervals to recompute the ENTIRE inverted index to integrate new data added via Apollo, resync data from the data sources, and include any saved records to Apollo

func Search(query string, searchType string, currentSearchResults map[string]string) (schema.Payload, error)

given a query string a search type (AND / OR ) returns a list of matches ordered by relevance

func Tokenize

func Tokenize(source string) []string

takes in a source of text and converts into an array of stemmed tokens (filtering out stop words and punctuation) This gets called when ingesting new data and when searching TODO: or is it better to just "generateAllPossibleVarations" of a word on the client side, then wouldn't need to stem on the backend?

Types

This section is empty.

Jump to

Keyboard shortcuts

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