Page Properties | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
Resources & Remarks Read On section and Summary are missing - add them. Modification History
|
...
To perform full-text search, use CONTAINS in the WHERE clause. The string values specified in the CONTAINS statements are handled without regards to case sensitivity. Their length might be limited by your search engine.
For the result list of a full-text search, it might be useful to sort it by SCORE(). The best matching results will be presented on top of the result list. If ORDER BY is not specified, the result list is ordered by the system:creationDate
object property by default.
Please also note that your search engine might need a suitable plug-in and corresponding configuration for optimal search behavior in your language. If you changed the configuration of your search engine, all objects that are imported afterwards will be indexed as defined by the new configuration. All objects that are already in the system remain unchanged and can be searched as before the configuration update. If you need all objects indexed with refer to the new configuration, you need a reindexing via your search engine.
>> Example Reindexing Procedure
...
Code Block | ||
---|---|---|
| ||
-- Select all types in which in full-text 'QUERY' was found.
SELECT * FROM type WHERE CONTAINS('QUERY');
-- Use 'SCORE()' for the order of the result list instead of the default order by 'system:creationDate'.
SELECT *,SCORE() s FROM type WHERE CONTAINS('QUERY') ORDER BY s ASC;
|
Logical Operators
The following logical operators are supported:
...
To sort the result list, use the ORDER BY clause. If ORDER BY is not specified, the result list is ordered by the system:creationDate
object property by default.
Code Block | ||
---|---|---|
| ||
-- Select all invoices where the invoice amount is greater than 1000, with the result list sorted in descending order of the invoice amount. SELECT * FROM invoice WHERE amount>1000 ORDER BY amount DESC; -- Select all invoices where the invoice amount is greater than 1000, -- with the result list sorted in descending order of the invoice amount and in ascending order of the date. SELECT * FROM invoice WHERE amount>1000 ORDER BY amount DESC, date ASC; |
...