Skip to content

Commit f00780d

Browse files
committed
📝 Update Readme
1 parent 5fdf905 commit f00780d

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)