JCR Queries - WHERE clause issue

We are attempting to retrieve content items using a JCR query resembling the following:


SELECT rx:sys_contentid, rx:sys_folderid FROM rx:exampleContentType WHERE rx:textField like '%Text%';

This statement will retrieve content items as expected; however, the behavior becomes an issue when the following content item is set up:

[TABLE=“class: grid, width: 500”]
<tbody>
Content Type
exampleContentType

Revision
1

textField
Text In A Field

public
0

</tbody>[/TABLE]

[TABLE=“class: grid, width: 500”]
<tbody>
Content Type
exampleContentType

Revision
2

textField
In a field

public
0

</tbody>[/TABLE]

[TABLE=“class: grid, width: 500”]
<tbody>
Content Type
exampleContentType

Revision
3

textField
empty

public
1

</tbody>[/TABLE]

Our query statement will match this content item even though the latest public revision of the content item cannot match “%Text%” in the “textField.” The results will show sys_revision as 3 with textField as “Text In A Field.”

We are running CM System 7.1. Wanted to see if anyone else has experienced this issue.

http://forum.percussion.com/showthread.php?433-JSR-170-Retrurning-All-Revisions&highlight=clob

I’ve read through that referenced thread and dismissed it due to the original poster’s case being slightly different. I will verify that the field hasn’t converted to a CLOB or BLOB.

UPDATE: The local field in our situation was set to max; therefore, its data type was CLOB. By setting the size to a value other than max our queries are working.

Should this be the desired behavior?