Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties
hiddentrue
idDONE

Product Version
Report Notepresentable
AssigneeReview Jan ("CONTAINS - Full-Text Search Features" heading)

Resources & Remarks

Read On section and Summary are missing - add them.

Modification History

NameDateProduct VersionAction
Antje08 FEB 20212.4New page properties macro.
Antje04 MAR 20212020 WinterQueries on tags added.
Antje27 MAY 20212021 SummerQueries in structured data added.
Antje07 JUL 20212021 AutumnRefacturing of CONTAINS section, Fuzzy & Boosting added, new style of code blocks.


...

  • use * as virtual column list to query all metadata fields
  • it is possible to use the SCORE() function in the virtual columns listthe virtual columns list
  • if ORDER BY is not specified, the result list is ordered by the system:creationDate object property
  • currently, only the query of a single object type is supported.

Note: The search on metadata fields is case sensitive. A case insensitive search is possible only by means of a CONTAINS statement.

Simple SELECT Queries

Queries on Object Types

...

To perform full-text search, use CONTAINS in the WHERE clause. The string values specified in the CONTAINS statements are handled case insensitive.

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.

If a field name is specified, only this field is checked for the search term.

...

If no field name is specified, a full-text search will be performed. All string metadata fields will be included in the search and if available, also the text rendition that was estimated by the CONTENTANALYZER service or set manually.

-- Select all types where in full-text 'QUERY' was found
Code Block
languagesql
-- Select all types where 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
languagesql
-- 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;

...

The conditions are specified in the same way like in single query calls. Date functions can be used, too.

ORDER BY and GROUP BY are not supported on tables.

...