In the great majority of cases, you will find it easiest to set a filter query using the <rql-filter> tag. However, there are two other ways of defining the filter used by an item descriptor. You might want to use one of these techniques if you need to set the filter query at runtime. You can set the filterQuery property of the item descriptor to a Query created by the same repository. Do this by creating a Query object and calling GSAItemDescriptor.setFilterQuery() on it. You can also set the item descriptor’s rqlFilterString to an RQL string that expresses the query. If the filterQuery property of the item descriptor is null, the SQL repository will attempt to use the rqlFilterString and compile it into the filter query. If both properties are null, then filtering is disabled.

Important: For best performance, it is strongly recommended that all properties referred to in the filterQuery or rqlFilterString should reside in the primary table for the item descriptor. Otherwise, potentially costly joins will be required for every item access. This could dramatically degrade repository performance. It is suggested that the filter not be changed too often. Each query executed by the SQL repository is AND-ed to the filter query before being executed (or looked up in the cache). If the filter or the RQL filter parameters are changed too often, the effectiveness of the query cache will be diminished. Changing the filter once or twice a day should not cause a problem.

 
loading table of contents...