Skip to content

Commit

Permalink
BL-1098 Index website pages (#47)
Browse files Browse the repository at this point in the history
- Website pages are not currently working in librarysearch.  This adds them to the web_content_type_facet
  • Loading branch information
dkinzer authored Mar 5, 2020
1 parent ea14971 commit 9564131
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 32 deletions.
3 changes: 3 additions & 0 deletions lib/cob_web_index/indexer_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
acc << "Library"
end

if rec.fetch("type") == "webpage"
acc << "Pages"
end

if rec.fetch("type") == "person"
acc << "People/Staff Directory"
Expand Down
64 changes: 32 additions & 32 deletions spec/fixtures/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"data": [
{
"id": "2",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Access Services",
"updated_at": "2019-05-30T10:33:41.133-04:00",
Expand All @@ -16,7 +16,7 @@
},
{
"id": "3",
"type": "page",
"type": "webpage",
"attributes": {
"label": "TULUP Diversity Statement",
"updated_at": "2019-05-30T10:33:45.860-04:00",
Expand All @@ -30,7 +30,7 @@
},
{
"id": "4",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Employment Opportunities",
"updated_at": "2019-05-30T10:33:54.480-04:00",
Expand All @@ -44,7 +44,7 @@
},
{
"id": "5",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Employment Opportunities for Temple Students",
"updated_at": "2019-05-30T10:34:00.405-04:00",
Expand All @@ -58,7 +58,7 @@
},
{
"id": "6",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Temple University Library System Summary: 2017-2018",
"updated_at": "2019-05-30T10:34:17.209-04:00",
Expand All @@ -72,7 +72,7 @@
},
{
"id": "7",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Temple University Libraries Annual Report",
"updated_at": "2019-05-30T10:34:27.278-04:00",
Expand All @@ -86,7 +86,7 @@
},
{
"id": "9",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Mission & key functions",
"updated_at": "2019-05-30T10:34:38.554-04:00",
Expand All @@ -100,7 +100,7 @@
},
{
"id": "10",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Operating principles",
"updated_at": "2019-05-30T10:34:43.057-04:00",
Expand All @@ -114,7 +114,7 @@
},
{
"id": "11",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Strategic Actions",
"updated_at": "2019-05-30T10:35:00.426-04:00",
Expand All @@ -128,7 +128,7 @@
},
{
"id": "12",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Donate books & other gifts-in-kind",
"updated_at": "2019-05-30T10:35:05.218-04:00",
Expand All @@ -142,7 +142,7 @@
},
{
"id": "8",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Speaking Volumes - Spring/Summer 2018",
"updated_at": "2019-07-09T15:08:47.997-04:00",
Expand All @@ -156,7 +156,7 @@
},
{
"id": "14",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Health Sciences Resources and Media",
"updated_at": "2019-07-17T11:33:40.817-04:00",
Expand All @@ -170,7 +170,7 @@
},
{
"id": "13",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Email",
"updated_at": "2019-07-15T15:38:12.965-04:00",
Expand All @@ -184,7 +184,7 @@
},
{
"id": "1",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Welcome to Temple University Libraries",
"updated_at": "2019-07-17T13:51:57.863-04:00",
Expand All @@ -198,7 +198,7 @@
},
{
"id": "18",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Connect with us on social media",
"updated_at": "2019-07-08T11:49:19.819-04:00",
Expand All @@ -212,7 +212,7 @@
},
{
"id": "20",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Faculty fellow recipients",
"updated_at": "2019-07-14T15:28:15.952-04:00",
Expand All @@ -226,7 +226,7 @@
},
{
"id": "21",
"type": "page",
"type": "webpage",
"attributes": {
"label": "SCRC homepage",
"updated_at": "2019-07-15T12:48:30.999-04:00",
Expand All @@ -240,7 +240,7 @@
},
{
"id": "22",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Graduate fellows recipients",
"updated_at": "2019-07-15T15:29:13.322-04:00",
Expand All @@ -254,7 +254,7 @@
},
{
"id": "23",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Digital scholarship recipients",
"updated_at": "2019-07-15T15:42:06.918-04:00",
Expand All @@ -268,7 +268,7 @@
},
{
"id": "35",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Selected publications of Charles L. Blockson",
"updated_at": "2019-07-18T08:36:08.256-04:00",
Expand All @@ -282,7 +282,7 @@
},
{
"id": "24",
"type": "page",
"type": "webpage",
"attributes": {
"label": "DSC homepage",
"updated_at": "2019-07-15T16:21:23.885-04:00",
Expand All @@ -296,7 +296,7 @@
},
{
"id": "36",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Selected African American internet resources",
"updated_at": "2019-07-18T08:38:46.037-04:00",
Expand All @@ -310,7 +310,7 @@
},
{
"id": "25",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Home",
"updated_at": "2019-07-16T08:40:41.447-04:00",
Expand All @@ -324,7 +324,7 @@
},
{
"id": "26",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Dean's welcome",
"updated_at": "2019-07-16T08:42:57.310-04:00",
Expand All @@ -338,7 +338,7 @@
},
{
"id": "27",
"type": "page",
"type": "webpage",
"attributes": {
"label": "About Charles Library",
"updated_at": "2019-07-16T08:44:34.338-04:00",
Expand All @@ -352,7 +352,7 @@
},
{
"id": "28",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Floorplans",
"updated_at": "2019-07-16T08:46:00.116-04:00",
Expand All @@ -366,7 +366,7 @@
},
{
"id": "29",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Gallery",
"updated_at": "2019-07-16T08:49:07.733-04:00",
Expand All @@ -380,7 +380,7 @@
},
{
"id": "30",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Giving",
"updated_at": "2019-07-16T08:57:41.397-04:00",
Expand All @@ -394,7 +394,7 @@
},
{
"id": "31",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Temple University Libraries History",
"updated_at": "2019-07-18T08:24:37.910-04:00",
Expand All @@ -408,7 +408,7 @@
},
{
"id": "19",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Frequently called numbers",
"updated_at": "2019-07-17T10:20:46.674-04:00",
Expand All @@ -422,7 +422,7 @@
},
{
"id": "16",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Databases by subject",
"updated_at": "2019-07-17T15:19:42.260-04:00",
Expand All @@ -436,7 +436,7 @@
},
{
"id": "34",
"type": "page",
"type": "webpage",
"attributes": {
"label": "Resources on African-American heritage in Philadelphia",
"updated_at": "2019-07-18T08:33:19.656-04:00",
Expand Down

0 comments on commit 9564131

Please sign in to comment.