Format Of Places Solr Document

THL Toolbox > Developers' Zone > Ruby on Rails Development > Place Dictionary > Format of Places Solr Document

Format of Solr Document Generated by Place Dictionary

Contributor(s): Andres Montano

Main Document

Here are the fields for Places Dictionary in the main document. Remember to also consult the Common Solr Fields for All Knowledge Maps.

  • tree: 'places'
  • feature_types: array of names for all related feature types.
  • feature_type_ids: array of ids for all related feature types.
  • associated_subjects: array of names for all associated subjects.
  • associated_subject_ids:: array of ids for all associated subjects.
  • has_shapes: boolean specifying if feature has shapes
  • has_altitudes: boolean specifying if feature has detailed altitudes. Feature may have a simple altitude as part of shapes subdocument!
  • block_type: ['parent']
  • interactive_map_url: url for interactive map
  • shapes_centroid_grptgeom: centroid as a geojson for feature.
  • kmz_url: url for kmz file for feature
  • closest_fid_with_shapes: fid of closest feature with shape. For instance if current feature does not have a shapefile, but parent does, it returns fid of parent.

Subdocuments

Here are the subdocuments for Places Dictionary. Remember to also consult the Common Solr Fields for All Knowledge Maps.

Feature types

Although this is a subdocument for a Places Dictionary subdocument, the actual information to produce it is mostly fetched from the Subjects Dictionary.

  • id: {uid of current}_featureType_{id of feature type}
  • related_uid_s: subjects-{feature type id} (uid of the related subject as feature types are subjects)
  • origin_uid_s: uid of current
  • feature_type_path_s: path within subjects tree of feature type in the format of "{id of grandparent}/{id of parent}/{id of current feature type}" (for however many levels there are)
  • block_child_type: ['feature_types']
  • block_type: ['child'] (refers to child in the solr "subdocument sense")
  • feature_type_name_s: prioritized name of feature type
  • related_names_t: array of all names of feature type (in the various languages, writing systems, etc.)
  • feature_type_id_i: id of feature type
  • feature_type_caption_s: prioritized caption of feature type
  • feature_type_caption_t: array of all captions of feature type
  • feature_type_citation_references_ss: array of citations for feature type formatted as a string. Tag would be avaiable if array is not empty.
  • feature_type_time_units_ss: array of time units for feature type formatted as a string. Tag would be avaiable if array is not empty.
  • feature_type_note_{note id}_{note fields}: prefix of note data for feature type. See note section for all fields

Related subjects

Although this is a subdocument for a Places Dictionary subdocument, the actual information to produce it is mostly fetched from the Subjects Dictionary.

  • id: {uid of current}_featureSubject_{id of subject}
  • related_uid_s: subjects-{subject id} (uid of the related subject)
  • origin_uid_s: uid of current
  • block_child_type: ['related_subjects']
  • related_subjects_path_s: path within subjects tree of related subject in the format of "{id of grandparent}/{id of parent}/{id of current feature type}" (for however many levels there are)
  • block_type: ['child'] (refers to child in the solr "subdocument sense")
  • related_subjects_header_s: prioritized name of related subject
  • related_names_t: array of all names of subject (in the various languages, writing systems, etc.)
  • related_subjects_id_i: id of feature type
  • related_subjects_caption_s: prioritized caption of related subject
  • related_subjects_caption_t: array of all captions of related subject
  • related_subjects_prefix_label_b: boolean specifying if label should be prefixed
  • related_subjects_parent_show_b: boolean specifying if parent subject should be displayed
  • related_subjects_root_show_b: boolean specifying if root subject should be displayed
  • related_subjects_display_string_s: display string taking all rules into account
  • related_subjects_numeric_value_i: numeric value for subject association
  • related_subjects_string_value_s: string value for subject association
  • related_subjects_citation_references_ss: array of citations for feature type formatted as a string. Tag would be avaiable if array is not empty.
  • related_subjects_time_units_ss: array of time units for feature type formatted as a string. Tag would be avaiable if array is not empty.
  • related_subjects_note_{note id}_{note fields}: prefix of note data for feature type. See note section for all fields

Relations

  • id: {uid of current}_{relation type code}_{id of related} (symmetric for parent relations and asymmetric for child relations; opposite from label!). For a list of relation types see external link: http://places.kmaps.virginia.edu/admin/feature_relation_types .
  • related_uid_s: uid of related
  • origin_uid_s: uid of current
  • block_child_type: ['related_places']
  • related_places_id_s: uid of related
  • related_places_header_s: prioritized name based on default view. id would be used if no name is available.
  • related_places_path_s: path based on default perspective or closest to it in the form of "{id of grandparent}/{id of parent}/{id of current}" (for however many levels there are)
  • related_places_feature_type_s: main feature type name. If no feaure type, tag will be included with blank value.
  • related_places_feature_type_id_i:: main feature type id. If no feaure type, tag will be included with nil value.
  • related_subjects_t:: array of names of all related subjects. Empty array if there aren't any related subjects.
  • related_subject_ids: array of ids of all related subjects. Empty array if there aren't any related subjects.
  • related_places_feature_types_t: array of names of all related feature types. Empty array if there aren't any related feature types.
  • related_places_feature_type_ids: array of ids of all related feature types. Empty array if there aren't any related feature types.
  • related_places_relation_label_s: relation type label (asymmetric for parent relations and asymmetric for child relations; opposite for code!).
  • related_places_relation_code_s: relation type code (symmetric for parent relations and asymmetric for child relations; opposite from label!).
  • related_kmaps_node_type: '{parent|child}' (depending if subdocument is for parent relation or child relation)
  • block_type: ['child'] (refers to child in the solr "subdocument sense"; independent if subdocument is for parent of child relation)
  • related_places_relation_citation_references_ss: array of citations for relation formatted as a string. Tag would be avaiable if array is not empty.
  • related_places_relation_time_units_ss: array of time units for relation formatted as a string. Tag would be avaiable if array is not empty.
  • related_places_note_{note id}_{note fields}: prefix of note data for relation. See note section for all fields

Altitudes

  • id: {uid of current}_altitude_{id of altitude}
  • block_child_type: ['places_altitude']
  • block_type: ['child'] (refers to child in the solr "subdocument sense")
  • maximum_i: maximum altitude
  • minimum_i: minimum altitude
  • average_i: average altitude
  • estimate_s: estimated altitude
  • unit_s: unit of measure of the above
  • citation_references_ss: array of citations for altitude formatted as a string. Tag would be avaiable if array is not empty.
  • time_units_ss: array of time units for altitude formatted as a string. Tag would be avaiable if array is not empty.
  • note_{note id}_{note fields}: prefix of note data for altitude. See note section for all fields

Shapes

  • id: {uid of current}_shape_{id of shape}
  • block_child_type: ['places_shape']
  • block_type: ['child'] (refers to child in the solr "subdocument sense")
  • geometry_rptgeom: shape file as geojson
  • geometry_type_s: name of geo type
  • area_f: area
  • altitude_i: altitude as simply a value. More complex altitude uses separate subdocument.
  • position_i: priorization for display
  • citation_references_ss: array of citations for shape formatted as a string. Tag would be avaiable if array is not empty.
  • time_units_ss: array of time units for shape formatted as a string. Tag would be avaiable if array is not empty.
  • note_{note id}_{note fields}: prefix of note data for shape. See note section for all fields

Provided for unrestricted use by the external link: Tibetan and Himalayan Library