StructuredDataMapping
Declares the Google Cloud Search value type to use for a document field sent as structured data.
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.
- YAML
- JSON
- XML
structuredDataMappings:
- field: price
type: DOUBLE
- field: published
type: DATE
{
"structuredDataMappings": [
{
"field": "price",
"type": "DOUBLE"
},
{
"field": "published",
"type": "DATE"
}
]
}
<structuredDataMappings>
<field>price</field>
<type>DOUBLE</type>
<field>published</field>
<type>DATE</type>
</structuredDataMappings>
Usageโ
Full configuration skeleton, with every option and its default
- YAML
- JSON
- XML
field: string
type: TEXT
{
"field": "string",
"type": "TEXT"
}
<structuredDataMapping>
<field>string</field>
<type>TEXT</type>
</structuredDataMapping>
Propertiesโ
| Property | Type | Required | Default |
|---|---|---|---|
field | string | No | - |
type | enum | No | TEXT |
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โ
TEXTINTEGERDOUBLEDATETIMESTAMPBOOLEANENUMHTML