meilisearchx

package
v0.0.96 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 6 Imported by: 36

Documentation

Index

Constants

This section is empty.

Variables

Client client for meili search server

Functions

func AddDocument

func AddDocument(indexName string, data map[string]interface{}) error

AddDocument addes object into meili search index

func DeleteDocument

func DeleteDocument(indexName string, id uint) error

DeleteDocument updates the document in meili index

func GenerateFieldFilter

func GenerateFieldFilter(ids []string, field string) string

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

func SearchWithQuery(indexName, q, filters string) ([]interface{}, error)

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

func UpdateDocument(indexName string, data map[string]interface{}) error

UpdateDocument updates the document in meili index

Types

This section is empty.

Jump to

Keyboard shortcuts

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