Documentation ¶
Index ¶
- func AddNewEntryToLocalData(data schema.Data)
- func Analyze(source string) []string
- func GetRecordFromData(currData schema.Data, uniqueID string) schema.Record
- func InitializeFilesAndData()
- func RefreshInvertedIndex()
- func Search(query string, searchType string, currentSearchResults map[string]string) (schema.Payload, error)
- func Tokenize(source string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNewEntryToLocalData ¶
func GetRecordFromData ¶
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 ¶
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 ¶
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.