sul-dlss-deprecated / rialto-derivatives

Listens to SNS messages and moves data from Neptune to Solr and Postgres to power the RIALTO webapp
0 stars 1 forks source link

One to many mapping between people and academic units #101

Closed peetucket closed 6 years ago

peetucket commented 6 years ago

When mapping people to org units (e.g. departments, institutes, etc.) via the Profiles API, note that one person can be and (for faculty) are often associated with multiple units. We need to preserve this one to many association, both when inserting data into Neptune and when putting in the derivative datastores. Right now, when I search on faculty members that I now to many associations, I only see one displayed in the website.

e.g. search for "Casciotti" -- she should be associated with BioX and Department of Earth Systems Science and a posssibly a couple other institutes. Right now it only shows BioX

justinlittman commented 6 years ago

Titles in source data:

[
  {
    "academicInstituteDisplay": true,
    "affiliation": "capFaculty",
    "appointmentType": "pr",
    "bannerDisplay": false,
    "jobCode": "1111",
    "label": {
      "html": "Associate Professor, <a href='http://earth.stanford.edu/ess'> Earth System Science</a>",
      "text": "Associate Professor, Earth System Science"
    },
    "organization": {
      "interDepartmentalProgram": false,
      "label": {
        "html": "<a href='http://earth.stanford.edu/ess'>Earth System Science</a>",
        "text": "Earth System Science"
      },
      "org": "Earth System Science",
      "orgCode": "TCAF",
      "orgUrl": "http://earth.stanford.edu/ess"
    },
    "title": "Associate Professor",
    "type": "faculty"
  },
  {
    "academicInstituteDisplay": true,
    "affiliation": "capFaculty",
    "appointmentType": "mb",
    "bannerDisplay": false,
    "jobCode": "1234",
    "label": {
      "html": "Member, <a href='http://biox.stanford.edu/'> Bio-X</a>",
      "text": "Member, Bio-X"
    },
    "organization": {
      "interDepartmentalProgram": false,
      "label": {
        "html": "<a href='http://biox.stanford.edu/'>Bio-X</a>",
        "text": "Bio-X"
      },
      "org": "Bio-X",
      "orgCode": "BIOX",
      "orgUrl": "http://biox.stanford.edu/"
    },
    "title": "Member",
    "type": "faculty"
  }
]
justinlittman commented 6 years ago

Titles in triplestore:

select ?label
where {
    ?org rdfs:label ?label .
    ?org a <http://xmlns.com/foaf/0.1/Organization> .
    ?org <http://vivoweb.org/ontology/core#relatedBy> ?pos .
    ?pos a <http://vivoweb.org/ontology/core#Position> .
    ?pos <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/people/45761> .
}
Bio-X (Independent Labs, Institutes, and Centers (Dean of Research))
--
Earth System Science (School of Earth, Energy and Environmental Sciences)
justinlittman commented 6 years ago

The solr doc only has a single org:

"response":{"numFound":1,"start":0,"maxScore":6.9628744,"docs":[
      {
        "department_label_ssim":["Bio-X (Independent Labs, Institutes, and Centers (Dean of Research))"],
        "id":"http://sul.stanford.edu/rialto/agents/people/45761",
        "institution_label_ssim":["Stanford University"],
        "name_tsim":["Karen Casciotti"],
        "school_label_ssim":["Independent Labs, Institutes, and Centers (Dean of Research)"],
        "type_ssi":"Person",
        "_version_":1614392785379524608,
        "timestamp":"2018-10-15T12:02:16.003Z",
        "score":6.9628744}]
  }