I will be starting a project for a customer that will make use of a number of Context Service features, including the "Search" capability. I've been experimenting with the current version (2.0.2) of Context Service's Search. I'd like to share my experiences and questions. I'd also like to get a summary of how the Search capability is currently working within Context Service 2.0.2.
I use custom fields and field sets in my Context Service objects. All of the fields are defined as follows:
The special search keys seem to work very well and are quite predictable. However, searching based on the contents of fields seems strange.
For example, if I search for all Customer objects that contain the value "Ace" in the Field "MAR_NEW_001_USERNAME", then I successfully retrieve my single Customer object.
However, if I search for all Customer objects that contain the value "MAR" in the Field "MAR_NEW_001_USERNAME", then I get back a large number of records, none of which contain the value "MAR" in the "MAR_NEW_001_USERNAME" field. All of the records that I get back contain the value "MAR" in some other field. Any idea how I can control this better?
The issue can be seen in the number of objects returned in the following code. Passing the two arguments "MAR_NEW_001_USERNAME" and "Ace" into the code will return a single Customer object (as expected). Passing the two arguments "MAR_NEW_001_USERNAME" and "MAR" into the code will return many Customers, Pods, and Requests (not as expected). The latter set of arguments should not return any objects.
public static void main (final String  args)
if ((args.length < 2) || (0 != (args.length % 2)))
Thanks to Tom Weissinger, this issue has been SOLVED. The core issue was that I was using the 2.0.2 version of the sdk extensions JAR file where I should have been using the 2.0.3 version of the sdk extensions JAR file.
Please make sure that you are using the latest and greatest versions of the Context Service JAR files.