Skip to main content

StructuredDataMapping

Declares the Google Cloud Search value type to use for a document field sent as structured data.

committer/googlecloudsearchJavadoc: StructuredDataMapping

Notesโ€‹

Structured data lets you send fields beyond Google's standard metadata set, but each one has to be typed so Google Cloud Search can index, filter and sort it correctly. The type declared here must match the property's type in the schema registered for your data source โ€” a mismatch is rejected at commit time.

Examplesโ€‹

Sends a price as a number and a publication date as a date, so both can be sorted and filtered on.

structuredDataMappings:
- field: price
type: DOUBLE
- field: published
type: DATE

Usageโ€‹

Full configuration skeleton, with every option and its default
field: string
type: TEXT

Propertiesโ€‹

PropertyTypeRequiredDefault
fieldstringNo-
typeenumNoTEXT

Property Detailsโ€‹

fieldโ€‹

Name of the document field this mapping applies to. It must also exist as a property in your data source's Google Cloud Search schema.

typeโ€‹

Value type of the field: TEXT (the default), INTEGER, DOUBLE, DATE, TIMESTAMP, BOOLEAN, ENUM or HTML.

Allowed Valuesโ€‹

  • TEXT
  • INTEGER
  • DOUBLE
  • DATE
  • TIMESTAMP
  • BOOLEAN
  • ENUM
  • HTML