Planning | Description | Requirements | UI Mockup | Triples | SOLR Design


SOLR and the ORE ontology gem

AggregationResource

Properties
PropertyPredicateTypeCountComments
id [ URI ]1rdf_subject
typeRDF::type [ URI ]1..mcan a resource not have a type?
titleRDF::DC.titlestring1 
descriptionRDF::DC.descriptionstring1 
ownerDCTERMS.creatorFOAF.person [ URI ]1..m

Likely moving to PROV-O or PRAV

can there be multiple owners?

aggregatesORE.aggregates[ URI ]0..m 
firstIANA.firstORE.proxy [ URI ]0..1 
lastIANA.lastORE.proxy [ URI ]0..m 

 

Solr
Fields
field nametypevaluevalue from propertyindexed (i)stored (s)multi (m)requiredfacetsortablesolrizer modifier
idstringrdf_subject of ORE.Aggregationobj.idyesyesnoyesno  
at_modelstring"LD4L::OreRDF::AggregationResource"obj.class.to_syesyesnoyesyes?_sim :facetable
title_titext"my","collection"obj.titleyesnonoyesnono_tesi :stored_sortable
_ssm :displayable
title_sort_ssstring"My Collection"obj.titlenoyesnoyesnoyesN/A
description_tsitext"my","collection","resources"obj.descriptionyesyesnoyesnono_tesim :stored_searchable
_ssm :displayable
owner_uri_ssstringFOAF.person [ URI ]obj.ownernoyes?yesnono_ssm :displayable
owner_name_titext"john","smith"obj.owner.nameyesno?yesyesno

_tesim :stored_searchable
_ssm :displayable
_sim :facetable

owner_name_sort_ssstring"John Smith"obj.owner.namenoyes?yesnoyesN/A
item_proxies_ssmstringORE.proxy [ URI ] - gathered from all proxiesgeneratedno

yes

yesnono?_ssm :displayable
aggregates_ssimstring[ URI ]obj.aggregatesyesyesyesnono?_ssim :displayable
object_profile_ssstring
"object_profile_ssm":[
  "{
     \"id\":\"http://www.example.org/a2d61b58-2207-49d4-b151-140def2b11c0\",
\"type\":\"http://www.openarchives.org/ore/terms/Aggregation\",
\"title\":\"My Collection\", \"description\":\"My collection of resources.\", \"owner\":\"http://example.org/elr\", \"aggregates\":[{\"https://newcatalog.library.cornell.edu/catalog/5449293\"}], \"first_proxy\":\"http://www.example.org/75661b44-4524-1883-3653-483d34b11a534\", \"last_proxy\":\"http://www.example.org/23161b44-9824-1323-8453-993d34b11a883\" }" ]
serialization of active_triples objectnoyes?yesnono_ssm :displayable

This is what ActiveFedora uses for its object_profile

NOTE: All fields are dynamic except id and at_model.

Example Solr Document
{
        "id":"http://www.example.org/a2d61b58-2207-49d4-b151-140def2b11c0",
        "at_model_ssi":"LD4L::OreRDF::AggregationResource",
        "title_sort_ss":"My Collection",
        "description_tsi":"My collection of resources.",
        "owner_uri_ss":"http://example.org/js333",
        "owner_name_sort_ss":"John Smith",
        "item_proxies_ssm": [
           "http://www.example.org/75661b44-4524-1883-3653-483d34b11a534"
           "http://www.example.org/82361b44-2324-1943-8a53-493d34b11a1c4"
           "http://www.example.org/23161b44-9824-1323-8453-993d34b11a883"
        ],
        "object_profile_ssm":[
           "{
              \"id\":\"http://www.example.org/a2d61b58-2207-49d4-b151-140def2b11c0\",
              \"type\":\"http://www.openarchives.org/ore/terms/Aggregation\",
              \"title\":\"My Collection\",
              \"description\":\"My collection of resources.\",
              \"owner\":\"http://example.org/elr\",
              \"aggregates\":[{\"https://newcatalog.library.cornell.edu/catalog/5449293\"}],
              \"first_proxy\":\"http://www.example.org/75661b44-4524-1883-3653-483d34b11a534\",
              \"last_proxy\":\"http://www.example.org/23161b44-9824-1323-8453-993d34b11a883\"
            }"
        ]
}
Queries

Get all collections owned by user.

http://localhost:8983/solr/#/development/select?
   q=owner_uri_ss:http://example.org/elr
   &fq=at_model_ssi:LD4L\:\:OreRDF\:\:AggregationResource
   &fl=id,object_profile_ssm

 

ProxyResource

Properties
PropertyPredicateTypeCountComments
id [ URI ]1rdf_subject
typeRDF:type[ URI ]1..mcan a resource not have a type?
proxyForORE.proxyFor[ URI ]1resource uri
proxyInORE.proxyInORE.Aggregation [ URI ]1aggregation uri
nextIANA.nextORE.proxy [ URI ]0..1uri of next proxy in the linked list
prevIANA.prevORE.proxy [ URI ]0..1uri of previous proxy in the linked list
contributorRDF::DC.contributorFOAF.person [ URI ]0..mLikely moving to PROV-O or PRAV

 

Solr
Fields
field nametypevaluevalue from propertyindexed (i)stored (s)multiValued (m)requiredfacetsortable
idstringrdf_subject of ORE.Proxyobj.idyesyesnoyesno 
at_model_ssistring"LD4L::OreRDF::ProxyResource"obj.class.to_syesyesnoyesyes?
proxy_in_ssistring[ URI ] of parent vcobj.proxy_inyesnonoyesyesno
proxy_for_ssistring[ URI ] of resource in catalogobj.proxy_foryesnonoyesyesno
prev_ssstring[ URI ]obj.prevnoyesnononono
next_ssstring[ URI ]obj.nextnoyesnononono
contributor_uri_ssstring[ URI ]obj.contributornoyes?yesnono
contributor_name_titext"john","smith"obj.contributor.nameyesno?yesyesno
contributor_name_sort_ssstring"John Smith"obj.contributor.nameno

yes

?yesnoyes
object_profile_ssstring
"object_profile_ssm":[
  "{
     \"id\":\"http://www.example.org/82361b44-2324-1943-8a53-493d34b11a1c4\",
\"type\":\"http://www.openarchives.org/ore/terms/Proxy\",
\"proxy_in\":\"http://www.example.org/a2d61b58-2207-49d4-b151-140def2b11c0\"
\"proxy_for\":\"https://newcatalog.library.cornell.edu/catalog/5449293\"
\"prev\":\"http://www.example.org/75661b44-4524-1883-3653-483d34b11a534\"
\"next\":\"http://www.example.org/23161b44-9824-1323-8453-993d34b11a883\"
}" ]
serialization of active_triples objectnoyes?yesnono
order_itsitint0..Ngeneratedyesyesnoyesnoyes
resource_title_titext"archery", "fundamentals"get from content negotiation of obj.proxy_foryesno?yesyesno
resource_title_sort_ssstring"Archery fundamentals"get from content negotiation of obj.proxy_fornoyes?yesnoyes
resource_author_titext["douglas", "engh"]get from content negotiation of obj.proxy_foryesnoyesnoyesno
resource_author_sort_ssstring["Douglas Engh."]get from content negotiation of obj.proxy_fornoyesyesnonoyes
resource_subject_titext["archery","arrow","bow","games","history"]get from content negotiation of obj.proxy_foryesnoyesnoyesno
resource_subject_sort_ssstring["Archery","Bow and arrow","Games,History"]get from content negotiation of obj.proxy_fornoyesyesnonoyes
resource_call_number_titext["anthropology","geography","history","recreation","world"]get from content negotiation of obj.proxy_foryesno?noyesno
resource_call_number_sort_ssstring["G - Geography, Anthropology, Recreation", "D - World History"]get from content negotiation of obj.proxy_fornoyes?nonoyes
resource_publisher_titext"champaign","il","human","kinetics","c2005"get from content negotiation of obj.proxy_foryesno?nonono
resource_publisher_ssstring"Champaign, IL : Human Kinetics, c2005."get from content negotiation of obj.proxy_fornoyes?nonoyes
resource_publication_year_ititint2005get from content negotiation of obj.proxy_foryesno?noyesno
resource_profile_ssstring
"resource_profile_ssm":[
"{ \"resource_title_sort_ss\":\"Archery fundamentals\",
\"resource_author_sort_ss\":[\"Douglas Engh.\"],
\"resource_subject_sort_ss\":[\"Archery\",\"Bow and arrow\",\"Games,History\"],
\"resource_call_number_sort_ss\":[\"G - Geography, Anthropology, Recreation\", \"D - World History\"],
\"resource_publisher_ss\":\"Champaign, IL : Human Kinetics, c2005.\"
}"
serialization of resource metadatanoyesnoyesnono

NOTE: All fields are dynamic except id and at_model.

Example Solr Document
{
        "id":"http://www.example.org/82361b44-2324-1943-8a53-493d34b11a1c4",
        "at_model":"LD4L::OreRDF::ProxyResource",
        "proxy_in_ssi":"http://www.example.org/a2d61b58-2207-49d4-b151-140def2b11c0"
        "proxy_for_ssi":"https://newcatalog.library.cornell.edu/catalog/5449293"
        "prev_ss":"http://www.example.org/75661b44-4524-1883-3653-483d34b11a534",
        "next_ss":"http://www.example.org/23161b44-9824-1323-8453-993d34b11a883",
        "contributor_uri_ss":"http://example.org/js333",
        "contributor_name_sort_ss":"John Smith",
        "object_profile_ssm":[
          "{
             \"id\":\"http://www.example.org/82361b44-2324-1943-8a53-493d34b11a1c4\",
             \"type\":\"http://www.openarchives.org/ore/terms/Proxy\",
             \"proxy_in\":\"http://www.example.org/a2d61b58-2207-49d4-b151-140def2b11c0\"
             \"proxy_for\":\"https://newcatalog.library.cornell.edu/catalog/5449293\"
             \"prev\":\"http://www.example.org/75661b44-4524-1883-3653-483d34b11a534\"
             \"next\":\"http://www.example.org/23161b44-9824-1323-8453-993d34b11a883\"
           }"
         ],
        "order_itsi":2
        "resource_title_sort_ss":"Archery fundamentals",
        "resource_author_sort_ss":["Douglas Engh."],
        "resource_subject_sort_ss":["Archery","Bow and arrow","Games,History"],
        "resource_call_number_sort_ss":["G - Geography, Anthropology, Recreation", "D - World History"],
        "resource_publisher_ss":"Champaign, IL : Human Kinetics, c2005."
        "resource_profile_ssm":[
          "{
             \"resource_title_sort_ss\":\"Archery fundamentals\",
             \"resource_author_sort_ss\":[\"Douglas Engh.\"],
             \"resource_subject_sort_ss\":[\"Archery\",\"Bow and arrow\",\"Games,History\"],
             \"resource_call_number_sort_ss\":[\"G - Geography, Anthropology, Recreation\", \"D - World History\"],
             \"resource_publisher_ss\":\"Champaign, IL : Human Kinetics, c2005.\"
           }"
         ]
}

 

Queries

Get display fields for first 20 items in a virtual collection __VC_URI__.

# assumes contiguous ordering which has implications for reordering, inserts, deletes with potential updates to all proxies in the worst case
http://localhost:8983/solr/#/development/select?
   q=proxy_in_ssi:__VC_URI__&
   &fq=at_model_ssi:LD4L\:\:OreRDF\:\:ProxyResource
   &fq=order_itsi:[0 TO 19]
   &fl=id,object_profile_ssm,resource_profile_ssm
   &sort=order

# potential to skip documents with reodering, inserts, deletes by other users
# has to get all documents before start + rows - has implications for getting start=1000000000 rows=20
http://localhost:8983/solr/#/development/select?
   q=proxy_in_ssi:__VC_URI__&
   &fq=at_model_ssi:LD4L\:\:OreRDF\:\:ProxyResource
   &fl=id,object_profile_ssm,resource_profile_ssm
   &sort=order
   &start=0
   &rows=19

 

Find next 20 items for a virtual collection __VC_URI__.

http://localhost:8983/solr/#/development/select?
   q=proxy_in_ssi:__VC_URI__&
   &fq=at_model_ssi:LD4L\:\:OreRDF\:\:ProxyResource
   &fq=order_itsi:[20 TO 39]
   &fl=id,object_profile_ssm,resource_profile_ssm
   &sort=order

http://localhost:8983/solr/#/development/select?
   q=proxy_in_ssi:__VC_URI__&
   &fq=at_model_ssi:LD4L\:\:OreRDF\:\:ProxyResource
   &fl=id,object_profile_ssm,resource_profile_ssm
   &sort=order
   &start=20
   &rows=19
  • No labels