Migrate to typesense as search backend
See original GitHub issueOverview
As discussed at #290, we can move to typesense to gain instant-search capability. The search experience should be easier and faster for the user, as it provides typo-tolerant and near real-time search results.
Implementation details
Typesense server will hosted by trustmedis and its contents are crawled hourly by wbw-gsheets-crawler. As discussed by @zainfathoni , there are three indices for now:
wbw-gsheets-database
wbw-gsheets-faq
wbw-gsheets-telemedicine
More indices can be added by making MR into crawler repository.
Fortunately, we have typesense-instantsearch-adapter as a wrapper of Algolia’s instantsearch react components. No need to write components from scratch.
API KEY information
CLICK ME
HOST : public-api.trustmedis.id PROTOCOL : https PORT : 443 API KEY : FByczfHEjsTCihgkkYlq2YbAgUKMoyVP
Code
A dirty implementation to instantiate typesense class should be looked like:
const searchAdapter = new TypesenseInstantSearchAdapter({
server: {
apiKey: API_KEY, // search-only API key
nodes: [
{
host: "public-api.trustmedis.id",
port: "443",
protocol: "https",
},
],
},
additionalSearchParameters: {
queryBy: ["pertanyaan" , "jawaban"], // for wbw-gsheets-faq index
},
});
Current Tasks
Unit & integration tests
End-to-end tests
Implementation
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Migrating from Algolia - Typesense
If an API call succeeds, it means that the data has been written to a majority of the nodes in the cluster and...
Read more >Running Typesense in Production
Scoped Search API Keys need to be generated in your backend stack, and passed on to the frontend which should then send that...
Read more >Building Search UIs - Typesense
Let's now install the Typesense InstantSearch adapter, to be able to use InstantSearch with a Typesense backend: To get InstantSearch.js to ...
Read more >Managing Access to Data - Typesense
This configuration will allow this API Key to only search for documents ... you could have your frontend make an API Call to...
Read more >Compare Algolia vs ElasticSearch vs Meilisearch vs Typesense
A side-by-side, feature-by-feature comparison of search engine alternatives ... N/A, since it's SaaS only, Requires JVM, and an application backend.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry, I wasn’t feeling well so I coudn’t work on it. Just pushed #401 update. Basic feature is done, but I still have some problems on the setting & testing.
First, for the setting as I mentioned here https://github.com/kawalcovid19/wargabantuwarga.com/pull/401#issuecomment-888246450
And for testing, since the data is from index, mock data can’t be initialized and passed as props. Tried to find mock for typesense/algolia but still can’t find it so I change the test using hardcoded text -> could result in failed test if the data is updated.
Well, I’ve also written a quick implementation of this approach in this commit from this
stateResults
reference mas @zainfathoni . Hope it helps.PS: pardon for bad styling, 😃)