Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/typesense/typesense-instantsearch-semantic-search-demo
A demo that shows how to build a semantic search experience with Typesense's vector search feature and Instantsearch.js
https://github.com/typesense/typesense-instantsearch-semantic-search-demo
algolia embeddings instantsearch instantsearch-js semantic-search sentence-bert typesense typesense-instantsearch-adapter
Last synced: 5 days ago
JSON representation
A demo that shows how to build a semantic search experience with Typesense's vector search feature and Instantsearch.js
- Host: GitHub
- URL: https://github.com/typesense/typesense-instantsearch-semantic-search-demo
- Owner: typesense
- License: apache-2.0
- Created: 2023-03-23T05:13:41.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-22T00:30:52.000Z (about 1 year ago)
- Last Synced: 2024-05-01T09:38:47.080Z (7 months ago)
- Topics: algolia, embeddings, instantsearch, instantsearch-js, semantic-search, sentence-bert, typesense, typesense-instantsearch-adapter
- Language: JavaScript
- Homepage:
- Size: 12.5 MB
- Stars: 22
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📦 Semantic Search with Typesense + Instantsearch.js
This is a demo that shows how you can use [Typesense's](https://github.com/typesense/typesense) vector search feature, to build a semantic search experience.
**NOTE: ⚠️** This demo uses Typesense version 0.24.0 which did not have built-in embedding generation. But in v0.25.0, we've added built-in emebedding generation, which makes it even more easy to build semantic search out of the box, without the need for an external embedding service. Here's a newer demo that takes advantage of this feature: [https://github.com/typesense/showcase-hn-comments-semantic-search](https://github.com/typesense/showcase-hn-comments-semantic-search).
Learn more about Vector Search here: [https://typesense.org/docs/0.25.0/api/vector-search.html](https://typesense.org/docs/0.25.0/api/vector-search.html).
## Tech Stack
The app was built using the
Typesense Adapter for InstantSearch.js.## Repo structure
- `src/` and `index.html` - contain the frontend UI components.
- `scripts/indexer` - contains the script to index the book data into Typesense.
- `scripts/data` - contains a small sample subset of products.
- `server` - contains the API server that generates embeddings given a query.## How to
Index sample dataset:
```shell
npm install
npm run typesenseServerln -s .env.development .env
npm run indexer
```Start Embedding API server:
```shell
cd serverpip install -r requirements.txt
uvicorn main:app --reload
```Start FE app:
```shell
npm start
```Open http://localhost:3001 to see the app.
## Credits
The dataset used in this showcase is from Algolia's public set of datasets listed here: https://github.com/algolia/datasets