7 Commits

Author SHA1 Message Date
Marco Minerva 8c6cc3c969 Improve README, add comments, and clean up VectorSearchService
Updated README.md for clarity and additional setup instructions:
- Refined repository description to highlight native Vector type.
- Rephrased note on Vector Support feature for readability.
- Removed mention of EFCore.SqlServer.VectorSearch library.
- Added instructions for updating VECTOR column size and setting Dimension property.

Added comment in Scripts.sql to guide vector size setting in Embedding column.

Cleaned up VectorSearchService.cs by removing unused and commented-out SQL command execution code.
2024-10-01 17:35:59 +02:00
Marco Minerva 1b2ebbd6a3 Update PK constraints, API description, and config comment
Updated primary key constraint names in Scripts.sql for Documents
and DocumentChunks tables. Enhanced document upload API endpoint
description in Program.cs to reflect the use of the new native
Vector type for embeddings. Added a comment in appsettings.json
to clarify the Dimensions setting in the Embedding section.
2024-10-01 14:37:01 +02:00
Marco Minerva 4355f72dab Refactor DB operations, rename tables, add Dapper
Refactored `VectorSearchService.cs` to use Dapper for DB operations, replacing raw ADO.NET commands. Updated methods for inserting, retrieving, and deleting documents and chunks. Modified vector search query to use Dapper's `QueryAsync`.

Updated `SqlDatabaseVectorSearch.csproj` to include Dapper package reference, version `2.1.35`.
2024-10-01 11:39:21 +02:00
Marco Minerva 3e95251485 Refactor to use the native VECTOR type 2024-09-30 17:08:28 +02:00
Marco Minerva b6a09d0926 Data access optimizations 2024-09-02 10:42:30 +02:00
Marco Minerva 45de38d87a Enhanced document chunk handling and API
- Updated `Scripts.sql` to add a new `[Index]` column to `[dbo].[DocumentChunks]` for order tracking.
- Modified `DocumentChunk.cs` to include a new `Index` property, and introduced a new immutable record class for document chunks.
- Introduced new API endpoints in `Program.cs` for document and chunk retrieval, including embedding details, with OpenAPI documentation enhancements.
- Updated an API endpoint description in `Program.cs` to clarify document embedding handling.
- Updated `VectorSearchService.cs` to reflect schema changes in service logic, adding methods for fetching document chunks and specific embeddings.
2024-07-10 11:25:50 +02:00
Marco Minerva a51618fd91 Rename Script.sql to Scripts.sql 2024-06-14 17:47:46 +02:00