IBM Support

ClearQuest Query using CONTAINS operator with a multiline string field may not return expected results when SQL Server FTS is enabled

Troubleshooting


Problem

Queries against fields using "contains" operator in the IBM Rational ClearQuest (CQ) query wizard may not return expected results when Microsoft SQL Server (SQL Server) FTS (Full Text Search) is enabled database-side.

Symptom

When SQL Server's Full Text Search (a database-side indexing, not to be confused with ClearQuest Full-Text Search) feature is enabled against a table, the ClearQuest query wizard will generate SQL in a different manner when the operator "contains" is used for a SQL Server database with SQL Server FTS vs. SQL with SQL Server FTS unenabled.

Non-SQL Server FTS enabled record types would have a SQL statement based on the SQL "like" operator with a % wildcard:
select T1.dbid,T1.id,T1.description,T1.headline from Defect T1 where T1.dbid <> 0 and ((T1.description like '%this is my search text%'))

When SQL FTS is enabled, the SQL statement is written using the SQL "contains" operator and uses a different wildcard:
select T1.dbid,T1.id,T1.description,T1.headline from Defect T1 where T1.dbid <> 0 and contains(T1.description, '"this is my search text*"')

These two different statements return different results.

When enabling SQL Server FTS, it is best to only search for a single term. When searching for multiple terms such as this example: "this is my search text" you may receive no hits.

[{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Database Configuration\/Connectivity - SQL Server","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.1.2;8.0;8.0.1","Edition":"","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

More support for:
Rational ClearQuest

Software version:
7.1.2, 8.0, 8.0.1

Operating system(s):
AIX, Linux, Solaris, Windows

Document number:
517247

Modified date:
01 August 2018

UID

swg21679424

Manage My Notification Subscriptions