Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateQuery ¶
func GenerateQuery(s string) []interface{}
Generates [{"fulltext": \^keyword1\}, {"fulltext": \^keyword2\}] With this query we can create a good enough full text search, which can search at the beginning of the keywords. We could write regexes which searches in the middle of the words too, but that query could not uzilize the btree indexes of mongodb. This solution must be efficient, assuming mongodb does the expected sane things: utilizing indexes with ^ regexes, "$and" queries and arrays.
Types ¶
Click to show internal directories.
Click to hide internal directories.