Skip to content

Commit

Permalink
Switch search APIs from dev to prod endpoints
Browse files Browse the repository at this point in the history
@xinli-cai deployed the semantic search API to production on 2024-06-27,
hurray! 🎉
  • Loading branch information
anthonyfok committed Jun 29, 2024
1 parent 392a243 commit f98d00c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/lib/components/RecordCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
let { record = {} as any }: Props = $props();
let appGeoCa = 'https://app-dev.geo.ca';
let appGeoCaBaseURL = 'https://app.geo.ca';
</script>

<li>
Expand All @@ -23,7 +23,7 @@
{/if}
{/if}
<a
href={appGeoCa +
href={appGeoCaBaseURL +
'/result/en/' +
record.title.replace(/\W+/g, '-').toLowerCase() +
'?id=' +
Expand All @@ -49,7 +49,7 @@
<button
onclick={() =>
window.open(
'https://app-dev.geo.ca/result/en/' +
appGeoCaBaseURL +
record.title.replace(/\W+/g, '-').toLowerCase() +
'?id=' +
record.id +
Expand Down
9 changes: 3 additions & 6 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
let query = $state('');
let keywordSearchURL = $derived(
`https://geocore-dev.api.geo.ca/geo?keyword=${encodeURIComponent(query)}&keyword_only=true&lang=en&min=1&max=10&sort=popularity-desc`
`https://geocore.api.geo.ca/geo?keyword=${encodeURIComponent(query)}&keyword_only=true&lang=en&min=1&max=10&sort=popularity-desc`
);
let semanticSearchURL = $derived(
`https://search-recherche.geocore-dev.api.geo.ca/search-opensearch?method=SemanticSearch&searchString=${encodeURIComponent(query)}`
`https://search-recherche.geocore.api.geo.ca/search-opensearch?method=SemanticSearch&searchString=${encodeURIComponent(query)}`
);
let keywordPromise = $state.frozen({} as Promise<any>);
let semanticPromise = $state.frozen({} as Promise<any>);
Expand Down Expand Up @@ -59,10 +59,7 @@
<main>
<h1>Semantic Search API Demo for GEO.ca</h1>
<p>(Scheduled for released in December 2024)</p>
<p>
Please note that this current version queries our development servers and works only within
NRCan/GoC network.
</p>

<p>Front-end demo v{version} (2024-06-29), work-in-progress</p>

<form id="searchForm" onsubmit={handleSearch}>
Expand Down

0 comments on commit f98d00c

Please sign in to comment.