While testing out parent/child feature, created 2 schemas.
Child schema:
schema item {
document item {
field id type long {
indexing : attribute
}
field campaign_ref type reference<campaign> {
indexing: attribute
}
}
import field campaign_ref.cpc as campaign_cpc {}
import field campaign_ref.syndicator_id as syndicator_id {}
}
And parent schema:
schema campaign {
document campaign {
field id type long {
indexing : attribute
}
field cpc type float {
indexing : attribute
}
field syndicator_id type long {
indexing : attribute
}
}
}
This worked fine. Then added to the child's summary an imported field - but it wasn't appearing the search response.
Child schema change:
schema item {
document item {
field id type long {
indexing : attribute
}
field campaign_ref type reference<campaign> {
indexing: attribute
}
}
import field campaign_ref.cpc as campaign_cpc {}
import field campaign_ref.syndicator_id as syndicator_id {}
document-summary item_summary {
summary syndicator_id type long {}
}
}
The test contains a single child and a single parent.
{"yql" : "select * from item where syndicator_id = 1 limit 3" }
Retrieves the item child document that is mapped to a campaign with a syndicator_id=1. But syndicator_id doesn't appear in the fields:
"children": [
{
"id": "id:candidation:item::2",
"relevance": 0.0017429193899782135,
"source": "vespa2",
"fields": {
"sddocname": "item",
"documentid": "id:candidation:item::2"
}
}
]