Skip to content

Commit

Permalink
chore: update index and scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
samithiwat committed Oct 31, 2023
1 parent 9cbc3b1 commit e2aaf97
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
8 changes: 7 additions & 1 deletion apps/opensearch-cli/index/beta/course-index.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"aliases": {
"course-beta": {}
"cgr-course-beta": {}
},
"settings": {
"index": {
Expand Down Expand Up @@ -73,6 +73,9 @@
}
}
},
"suggestions": {
"type": "completion"
},
"abbrName": {
"type": "text",
"analyzer": "courseabbranal"
Expand Down Expand Up @@ -106,6 +109,9 @@
},
"academicYear": {
"type": "keyword"
},
"creditHours": {
"type": "keyword"
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion apps/opensearch-cli/index/dev/course-index.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"aliases": {
"course-dev": {}
"cgr-course-dev": {}
},
"settings": {
"index": {
Expand Down Expand Up @@ -73,6 +73,9 @@
}
}
},
"suggestions": {
"type": "completion"
},
"abbrName": {
"type": "text",
"analyzer": "courseabbranal"
Expand Down Expand Up @@ -106,6 +109,9 @@
},
"academicYear": {
"type": "keyword"
},
"creditHours": {
"type": "keyword"
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion apps/opensearch-cli/index/prod/course-index.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"aliases": {
"course-prod": {}
"cgr-course-prod": {}
},
"settings": {
"index": {
Expand Down Expand Up @@ -73,6 +73,9 @@
}
}
},
"suggestions": {
"type": "completion"
},
"abbrName": {
"type": "text",
"analyzer": "courseabbranal"
Expand Down Expand Up @@ -106,6 +109,9 @@
},
"academicYear": {
"type": "keyword"
},
"creditHours": {
"type": "keyword"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ export class QueueConsumerService {
semester: course.semester,
studyProgram: course.studyProgram,
creditHours: course.creditHours,
suggestions: [
{
input: [course.courseNo, course.abbrName, course.courseNameEn, course.courseNameTh],
weight: 20,
},
],
} as CourseDoc,
doc_as_upsert: true,
},
Expand Down

0 comments on commit e2aaf97

Please sign in to comment.