-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kb): add some kb metadata (#36)
Because knowledgebase metadata needs 1. file # 2. tokens # 3. correct pipeline name This commit 1. add kb_uid in chunk table and set index on it for count performance. 2. modify pipeline name
- Loading branch information
Showing
14 changed files
with
809 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,3 +121,4 @@ tmp | |
test_.pdf | ||
test_.md | ||
test_pdf_base64.txt | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
BEGIN; | ||
|
||
-- Drop the index | ||
DROP INDEX IF EXISTS idx_text_chunk_kb_uid; | ||
|
||
-- Remove the column | ||
ALTER TABLE text_chunk DROP COLUMN IF EXISTS kb_uid; | ||
|
||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
BEGIN; | ||
|
||
-- Add the new column kb_uid | ||
ALTER TABLE text_chunk ADD COLUMN kb_uid UUID; | ||
|
||
-- Add a comment for the new column | ||
COMMENT ON COLUMN text_chunk.kb_uid IS 'Knowledge Base unique identifier'; | ||
|
||
-- Create an index on the new column | ||
CREATE INDEX idx_text_chunk_kb_uid ON text_chunk (kb_uid); | ||
|
||
COMMIT; |
Empty file.
10 changes: 0 additions & 10 deletions
10
pkg/db/migration/000009_add_pipeline_metadata_column_to_kb_table.up.sql
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.