In the great majority of cases, it is easiest to set a filter query with 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 tries to use the rqlFilterString and compile it into the filter query. If both properties are null, filtering is disabled.

Note: 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 are required for every item access. This can dramatically degrade repository performance. It is suggested that the filter not be changed too often. Each query executed by the SQL repository is AND’d 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 is diminished. Changing the filter once or twice a day should not cause a problem.

 
loading table of contents...