-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Labels
Description
Suggestion
Suport full text search in mysql using match against
Examples
To query data i thought this:
{"where": {"fts": { "match": ["column1", "column2"], "against":"filter" }}}
I studied the code and implement this inside de method 'SQLConnector.prototype._buildWhere'
if (key === 'fts') {
console.log("Full text search!!!");
const matchObj = where[key]["match"];
const match = Array.isArray(matchObj)
? matchObj.map(c => self.columnEscaped(model, c)).join(",")
: self.columnEscaped(model, matchObj);
stmt.merge(`MATCH(${match}) AGAINST('${where[key]["against"]}')`);
whereStmts.push(stmt);
continue;
}
Acceptance criteria
There is any suggestion to enhance the solution?
This idea is in the scope of this project? If yes, how can i do a pull request?