Documentation ¶
Index ¶
- Variables
- func AddDocument(indexName string, data map[string]interface{}) error
- func DeleteDocument(indexName string, id uint) error
- func GenerateFieldFilter(ids []string, field string) string
- func GetIDArray(hits []interface{}) []uint
- func SearchWithQuery(indexName, q, filters string) ([]interface{}, error)
- func SetupMeiliSearch(...) error
- func UpdateDocument(indexName string, data map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Client *meilisearch.Client
Client client for meili search server
Functions ¶
func AddDocument ¶
AddDocument addes object into meili search index
func DeleteDocument ¶
DeleteDocument updates the document in meili index
func GenerateFieldFilter ¶
GenerateFieldFilter generates filter in form "(field=x OR field=y OR ...)"
func GetIDArray ¶
func GetIDArray(hits []interface{}) []uint
GetIDArray gets array of IDs for search results
func SearchWithQuery ¶
SearchWithQuery calls meili with q
func SetupMeiliSearch ¶
func SetupMeiliSearch(indexes, searchableAttributes, filterableAttributes, sortableAttributes, rankingAttritubes, stopWords []string) error
SetupMeiliSearch setups the meili search server index
func UpdateDocument ¶
UpdateDocument updates the document in meili index
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.