Message-ID: <212083996.3068.1485851858449.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3067_236545871.1485851858449" ------=_Part_3067_236545871.1485851858449 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Criteria reference

Criteria reference

Intro

Criteria are the filters for Content= and Location Search in "Platform stack", for generic use of API Search see=  Search Crit= eria and Sort Clauses

Criteria, the plural form for Criterion, consists of two parts just like= SortClause and FacetBu= ilder:

The Criterion represents the value you use in the= API, while CriterionHandler deals with the business= logic in the background translating the value to something the Search engi= ne can understand.

Implementation and availability of a handler typically depends = on SearchEngine capabilities/limitations, currently only Legacy (S= QL) Search Engine exists, and for instance its support for FullText an= d Field Criterion is not optimal and it is advised to avoid heavy use of th= ese until future search engine arrives.

Common concepts = for most Criteria

For how to use each and every Criterion see list below as it depends on = the Criterion Value constructor, but in general you should be= aware of the following common concepts:

 

In the Legacy search engine, the field index/sort key column is limited = to 255 characters by design.
Due to this storage limitation, searching c= ontent using the eZ Country fieldtype when there are multiple countries sel= ected may not return all the expected results.

 


List of Criteria

The list below reflects Criteria available in eZ\Publish\API\Reposi= tory\Values\Content\Query\Criterion namespace (it is also possible to make custom criterion= ):

Only for LocationSearch<= /h3>
Criterion Constructor arguments description
Location\Depth >=3D 5.3/2014.03<= /span> operator (IN, E= Q, GT, GTE, LT, LTE, BETWEEN), value being= the location depth(s) as an integer(s).
Location\IsMainLocation >=3D 5.3= /2014.03 Whether or not the value mea= ning if the location is a Main Location
value
(Location\IsMainLocation::MAIN, Location\= IsMainLocation::NOT_MAIN).
Location\Priority >=3D 5.3/2014.= 03 Priorities are integers that= can be used for sorting in ascending or descending order. What is higher o= r lower priority in relation to the priority number is left to the user cho= ice.
operator
(GT, GTE, LT, LTE, BETWEEN), value being the location priority(s) as an integer(s).

Only for ContentSearch
Criterion Constructor arguments description
Depth DEPRECATED IN 5.3/2014.03 Use LocationSearch with Loca= tion\Depth, since Depth can give unpredictable results = when content has several locations.
LocationPriority DEPRECATED IN 5.3/20= 14.03 Use LocationSearch with Location\Priority, since LocationPriority= can give unpredictable results when content has several loca= tions.

Common

Criterion Constructor arguments description
ContentId value being sca= lar(s) representing the Content id.
ContentTypeGroupId value being sca= lar(s) representing the ContentTypeGroup id.
ContentTypeId value being sca= lar(s) representing the ContentType id.
ContentTypeIdentifier = = >=3D 5.1/2013.01 value being str= ing(s) representing the ContentType identifier, example: "article".<= /td>
DateMetadata target (D= ateMetadata::MODIFIED , DateMetadata= ::CREATED), operator (IN, EQ, GT, GT= E, LT, LTE, BETWEEN), value being integer(s) represen= ting unix timestamp.
Field

target (FieldDefinition identifier), operator (IN, EQ, GT, GTE, LT, LTE, LIKE, BETWEEN, CONTAINS), value= being scalar(s) relevant for the field.

FieldRelation >=3D 5.3/2014.05 target (<= /code>FieldDefinition identifier), operator (IN, CONTAINS),=  value being array of scalars representing Content id of relation.
Use of= IN means relation needs to have one of the provided ID's, whi= le CONTAINS implies it needs to have all provide id's.
FullText

value being the st= ring to search for, properties is array to set additional prop= erties for use with future search engines like Solr/ElasticSearch.

LanguageCode value being string(s)= representing Language Code(s) on the Content (not on Fields), matchAlwaysAvailable >=3D 5.2/2013.11 as boolean.
LocationId value being sca= lar(s) representing the Location id.
LocationRemoteId value being str= ing(s) representing the Location Remote id.
LogicalAnd A LogicalOperator that takes array of other= Criteria, makes sure all Criteria matches.
LogicalNot A Logical= Operator that takes array of other Criteria, makes sure= none of the Criteria matches.
LogicalOr A Logical= Operator that takes array of other Criteria, makes sure= one of the Criteria matches.
MapLocationDistance <= span class=3D"status-macro aui-lozenge aui-lozenge-current">>=3D 5.3/201= 4.03 target (<= /code>FieldDefinition identifier), operator (IN, EQ, GT, GTE, LT, LTE, <= code>BETWEEN), distance as float(s) from a position using latitude= as float, longitude as float as arguments
MatchAll No arguments, mainly for inter= nal use when no filter or query is provided on Query object.
MatchNone No arguments, mainly = for internal use by BlockingLim= itation.
MoreLikeThis NOT IMPLEMENTED
ObjectStateId value being str= ing(s) representing the Content ObjectState id.
ParentLocationId

value being scalar(s) rep= resenting the Parent's Location id

RemoteId value being str= ing(s) representing the Content Remote id.
SectionId value being sca= lar(s) representing the Content Section id.
Subtree value being str= ing(s) representing the Location id in which you can filter. If the Loc= ation Id is  /1/2/20/42, you will filter everything under 42.
=
UserMetadata target (UserMeta= data::OWNER , UserMetad= ata::GROUP, UserMetadata::MODIFIER), operator (IN, EQ), value being = scalars(s) representing the User or UserGroup id(s).
Visibility value (Visibilit= y::VISIBLE , Visibility= ::HIDDEN), Note: This acts on all ass= igned locations when used with ContentSearch, meaning hidden content will b= e returned if it has a location which is visible. Use LocationSearch to avo= id this.
------=_Part_3067_236545871.1485851858449--