File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -58,14 +58,24 @@ C4Context
5858
5959### API Endpoints
6060
61- * **`POST /books`**
62- Add a new book by providing its title and description. The service generates and stores a semantic embedding of the description in the database.
61+ #### `POST /books`
6362
64- * **`GET /search?q=your+query`**
65- Perform a semantic search on the stored books using the query text. Returns a list of matching books ranked by relevance .
63+ Add a new book by providing its title, description, and ISBN.
64+ The service generates and stores a ** semantic embedding** and full- text index .
6665
67- * **`GET /ping`**
68- Simple health check endpoint to verify if the service is running.
66+ #### `GET /search/vector?q=your+query`
67+
68+ Perform a **semantic search** on stored books using vector similarity with the query.
69+ Returns books ranked by **cosine similarity** of embeddings.
70+
71+ #### `GET /search/text?q=your+query`
72+
73+ Perform a **full-text search** using PostgreSQL’s full-text index on title and description.
74+ Returns books ranked by **textual relevance (ts\_rank)**.
75+
76+ #### `GET /ping`
77+
78+ Health check endpoint to verify if the service is running.
6979
7080#### Example Usage
7181
You can’t perform that action at this time.
0 commit comments