ezsystems/ezp-next — pull request #132 by emodric (2012-11-12 14:41:07+00:00)
Title: EZP-20018: Missing Language, Visibility & ObjectState Criteria

DO NOT MERGE!

Implements three missing criteria.

Issues:

1) Missing matching Solr criterion visitors

2) Potential bottlenecks in Visibility and ObjectState legacy criterion handlers

The only way to match on tables other than ezcontentobject is to use subselects. This is fine for LocationId criterion, for example, since the subselect is fairly simple (SELECT contentobject_id FROM ezcontentobject_tree WHERE node_id = 42).

However, for Visibility criterion, subselect will return most of contentobject_id values from tree table since for the most part, 99% of objects will be visible. This can potentially be a bottleneck when repository has many objects. Subselect in this case is "SELECT contentobject_id FROM ezcontentobject_tree WHERE is_hidden = 0 AND is_invisible = 0".