Types of Public Content API fields
There are different types of fields you can use or encounter when using the Public Content API.
- Root fields
-
The following are queryable root fields. All field values above should be supplied as strings from the Public Content API, because strings are the only data type that the PCA accepts.
Name of root field Remarks authorclientIdcontentseparated by language; strictproperty has a special meaning (see below)createdDatestrictproperty not supporteddynamicitemTypelocalelocationmajorVersionminorVersionmodifiedDatestrictproperty not supportednamespacepublicationIdpublicationTitlerawLanguageTitleseparated by language; strictproperty has a special meaning (see below)schemaIdurl - Metadata fields
-
Searchable metadata fields are stored in a map of fields called
dynamic. To query metadata fields, preface the metadata field name withdynamicfollowed by a+character. So, to designate theversion-apimetadata field, set the field name in your query todynamic+version-api. - Language-specific fields
-
Two fields,
contentandrawLanguageTitle, must be appended with a+character followed by the Elasticsearch language name. That is, to search the content in Swedish, usecontent+swedishand to search the title in Japanese, userawLanguageTitle+japanesein your queries. - Non-searchable fields
-
Any fields that were configured as non-indexable in Content Manager are in the Elasticsearch database, but are not searchable. The only way to retrieve the content of such fields is by including them in the search results of a search for a different field. This type of field is stored in a separate map of fields called
dynamic_not_indexed. You reference these fields using the+character, the same as for searchable metadata fields. -
Fields that can be retrieved as a
SearchResult -
The following fields can be retrieved as a search result:
Field name Data type Remarks authorStringbinaryAuthorStringExtracted by Apache Tika plugin for Elasticsearch binaryContentLengthLongExtracted by Apache Tika plugin for Elasticsearch binaryContentTypeStringExtracted by Apache Tika plugin for Elasticsearch binaryCreatedDateStringExtracted by Apache Tika plugin for Elasticsearch binaryFileNameStringExtracted by Apache Tika plugin for Elasticsearch binaryLanguageStringExtracted by Apache Tika plugin for Elasticsearch binaryTitleStringExtracted by Apache Tika plugin for Elasticsearch createdDateStringfieldsMapContains dynamic and non-dynamic metadata highlightedMapRetrievable only if highlighting was enabled in the search request idStringitemTypeStringlocaleStringlocationStringmainContentFieldStringmajorVersionStringminorVersionStringmodifiedDateStringnamespaceStringpublicationIdIntpublicationTitleStringrawContentStringrawLanguageTitleStringschemaIdStringurlString