Skip to content

Commit

Permalink
fix bug with WoS string and meili host
Browse files Browse the repository at this point in the history
  • Loading branch information
rickjohnson committed Jun 9, 2024
1 parent 9c6dc9b commit 8d7d590
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/pages/CenterReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ export default {
// pad zeroes if needed
var strSourceId = `${publication.source_id}`
while (strSourceId.length < 15) {
strSourceId = `0${strSourceId}
strSourceId = `0${strSourceId}`
}
return `WOS:${publication.source_id}`
} else {
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ export default {
// pad zeroes if needed
var strSourceId = `${personPublication.publication.source_id}`
while (strSourceId.length < 15) {
strSourceId = `0${strSourceId}
strSourceId = `0${strSourceId}`
}
return `WOS:${personPublication.publication.source_id}`
} else {
Expand Down
5 changes: 4 additions & 1 deletion dashboard-search/src/ingest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const meiliUrl = `${process.env.APP_BASE_URL}/api/search/`
const sleep = util.promisify(setTimeout)

const searchClient = new MeiliSearch({
host: 'http://127.0.0.1:7700', // todo fix this sometime
host: `${process.env.MEILI_HOST}`, // todo fix this sometime
apiKey: meiliKey
})

Expand Down Expand Up @@ -257,6 +257,7 @@ function getNormedPersonPublications(reviewPersonPublications) {
async function main() {
console.log(await searchClient.getKeys())
try {
console.log("-------------get publications index to refresh if exists-------------")
let index = await searchClient.getIndex('publications')
index.delete()
} catch ( err ) {
Expand All @@ -265,8 +266,10 @@ async function main() {

let index
try {
console.log("-------------try creating publications index-------------")
index = await searchClient.createIndex('publications')
} catch ( err ) {
console.log("-------------get existing publications index-------------")
index = await searchClient.getIndex('publications')
}

Expand Down

0 comments on commit 8d7d590

Please sign in to comment.