This tag emulates FileMaker's convenient fulltext search behavior with MySQL. It searches for words beginning with the words in the query, appearing in any order, with either AND or OR in one or multiple fields, including support for "phrase searches", using either ldml or sql inlines. However it does not take advantage of any MySQL index so it's best suited for databases that are not too large (some 10,000 records work fine).
Search for dog cat will find caterpillar in a doghouse but not scattered dogs. Also supports phrases in search request such as "black dog" which will find black dog or black doghouse but not black spotted dog
The tag works with Lasso 6 and later.
Version 1.0.1 2004-02-24 Removed ` around SQL field names Version 1.0 2004-02-12
Parameters
none
Sample Usage
normal search with default AND operator between search words, to use in ldml inline (default)
inline: -database...,
(fulltext: 'fieldname'='search string'),
-search;
search with OR operator between search words:
inline: -database...,
(fulltext: 'fieldname'='search string', -or),
-search;
make the search span multiple fields as if they were one concatenated field
inline: -database...,
(fulltext: (array: 'fieldname1', 'fieldname2', ...)='search string'),
-search;
use fulltext in SQL inline
inline: -database...,
-sql='SELECT * FROM table WHERE '
+ (fulltext: 'fieldname'='search string', -sql),
-search;
Test form:
<form action="[response_filepath]">
<input type="text" name="text" value="[action_param: 'text']">
</form>
<hr>
One field, ldml:
<br>
[(fulltext: 'searchfield'=(action_param: 'text')) -> join: '<br>']
<hr>
Multiple fields, ldml:
<br>
[(fulltext: (array: 'subject', 'body')=(action_param: 'text')) -> join: '<br>']
<hr>
Multiple fields, ldml, OR operator:
[(fulltext: (array: 'subject', 'body')=(action_param: 'text'), -or) -> join: '<br>']
<hr>
<br>
One field, sql:
<br>
[fulltext: 'searchfield'=(action_param: 'text'), -sql]
<hr>
Multiple fields, sql:
<br>
[fulltext: (array: 'subject', 'body')=(action_param: 'text'), -sql]
<hr>
Multiple fields, sql, OR operator:
[fulltext: (array: 'subject', 'body')=(action_param: 'text'), -sql, -or]
<hr>
Source Code
Click the "Download" button below to retrieve a copy of this tag,
including the complete documentation and sample usage shown
on this page. Place the downloaded ".inc" file in your
LassoStartup folder, restart Lasso, and you can begin using this
tag immediately.