<@U076GF3T0HY> - Thank you for your reply; However...
# community-help
r
@Fanis Tharropoulos - Thank you for your reply; However, I would like to handle this in server side itself instead of client side; @Harpreet Sangar Here is the requested schema details; In this organization_id would be the reference field used for left join; FYI: Organization may/may not have location records; Location type would be either Head Quarters (HQ)/Branch; Please let me know if you need further details;
Copy code
{
  "name": "organizations",
  "fields": [
    {
      "name": "id",
      "type": "string",
      "index": true
    },
    {
      "name": "organization_id",
      "type": "int64",
      "index": true,
      "sort": true,
      "range_index": true
    },
    {
      "name": "organization_name",
      "type": "string",
      "index": true,
      "sort": true,
      "infix": true,
      "stem": true
    },
    {
      "name": "organization_type",
      "type": "string",
      "index": true,
      "facet": true,
      "optional": true
    },
    {
      "name": "organization_desc",
      "type": "string",
      "index": true,
      "optional": true,
      "stem": true,
      "infix": true
    }
  ],
  "default_sorting_field": "organization_name"
}
Copy code
{
  "name": "organization_locations",
  "fields": [
    {
      "name": "id",
      "type": "string",
      "index": true
    },
    {
      "name": "location_id",
      "type": "int64",
      "index": true,
      "optional": false,
      "sort": true,
      "range_index": true
    },
    {
      "name": "address_line1",
      "type": "string",
      "index": true,
      "optional": true
    },
    {
      "name": "address_line2",
      "type": "string",
      "index": true,
      "optional": true
    },
    {
      "name": "address_city",
      "type": "string",
      "index": true,
      "optional": true
    },
    {
      "name": "state_code",
      "type": "string",
      "index": true,
      "optional": true
    },
    {
      "name": "state_name",
      "type": "string",
      "index": true,
      "optional": true
    },
    {
      "name": "country_code",
      "type": "string",
      "index": true,
      "optional": true
    },
    {
      "name": "country_name",
      "type": "string",
      "index": true,
      "optional": true
    },
    {
      "name": "address_zip",
      "type": "string",
      "index": true,
      "optional": true
    },
    {
      "name": "latlong_addr",
      "type": "geopoint",
      "index": true,
      "optional": true
    },
    {
      "name": "location_type_id",
      "type": "int32",
      "index": true,
      "optional": true,
      "sort": true,
      "range_index": true
    },
    {
      "name": "location_type",
      "type": "string",
      "index": true,
      "optional": true
    },
    {
      "name": "organization_id",
      "type": "int64",
      "index": true,
      "sort": true,
      "range_index": true,
      "reference": "organizations.organization_id"
    }
  ]
}