I am trying to create an index in my .yaml file that I can use to access a nested array of key value pairs in an entity

60 Views Asked by At

Following are the structurs as defined in Go that I am using.

type MetadataEntry struct {
    Key   string
    Value string
}

// OCHAppointment represents the structure of an OCH appointment
// still need to determine how to manage metadata field
type OCHAppointment struct {
Key                *datastore.Key   `datastore:"__key__" json:"key"`
OrgID              int64            `json:"orgID"`
ID                 int64            `json:"id"`
URL                string           `datastore:",noindex" json:"url"`
Title              string           `datastore:",noindex" json:"title"`
Requested          time.Time        `datastore:",noindex" json:"requested"`
Creation           time.Time        `json:"creation"`
LastUpdate         time.Time        `datastore:",noindex" json:"lastUpdate"`
Datetime           time.Time        `json:"datetime"`
Duration           int              `datastore:",noindex" json:"duration"`
Type               string           `json:"type"`
Status             string           `json:"status"`
Cancelled          bool             `datastore:",noindex" json:"cancelled"`
ContactID          int64            `json:"contactID"`
ProviderID         int64            `json:"providerID"`
Provider           string           `datastore:",noindex" json:"provider"`
DivisionID         int64            `json:"divisionID"`
Division           string           `datastore:",noindex" json:"division"`
PrimaryParticipant string           `json:"primaryParticipant"`
Participants       []OCHParticipant `bigquery:"-" datastore:",noindex" json:"participants"`
Metadata           []MetadataEntry  `bigquery:"-" datastore:",noindex" json:"metadata"`
Tracking           []Tracker        `bigquery:"-" datastore:",noindex" json:"tracking"`
}

I have deployed the following in the index file

- kind: OchAppointments
  properties:
  - name: Metadata.Key
  - name: Metadata.Value

With no luck using Go to filter the data or using GQL with the cloud console.

I tried with GO and with GQL to return valuses with the index and neither appears to work.

0

There are 0 best solutions below