Content Search Services
Adding the CONTAINS clause allows you to full-text search (to search the contents of the documents).
Prerequisites
- Enable CSS through the CR.
Follow the steps in the same Object Store in which CSS is enabled.
Upload the Sample Document
Here we will upload this simple text document containing the word 'several' to filenet. Download it now by clicking on the link.
Open the acce console, navigate to the root folder (or folder of your choice), and create a new Document:
Give it a name of your choice and ensure that the With content checkbox is selected:
Click Next. Under Content Elements, click Add, then Browse and select the downloaded file:
Click Add Content and ensure that the MIME type is text/plain.
Continue clicking Next until you reach the Summary screen: Now, review your choices and click Finish:
Run the SQL Query
Navigate to the Search page:
Click on New Object Store Search:
Switch to the SQL View. Here you will see a default query that retreives all metadata for all documents in the index area:
Replace the sample query with the following:
SELECT d.This
FROM Document d
INNER JOIN ContentSearch c ON d.This = c.QueriedObject
WHERE CONTAINS(d.*,'several')
OPTIONS (FULLTEXTROWLIMIT 500)
and click Run:
The uploaded document appears in the search result:
The document was found because its content contains the word 'several'.
This is made possible due to:
- The content search services we enabled
- index area corresponding to this object store
- content based retreival
- CONTAINS clause in the query
- requires an INNER JOIN
For more information on the SQL syntax, see CBR queries.