Skip to content

Commit

Permalink
Merge pull request #86 from Mintplex-Labs/embedding-overview-search-fix
Browse files Browse the repository at this point in the history
fix workspace document searching
  • Loading branch information
timothycarambat authored Dec 9, 2023
2 parents 1cf6e5f + 94e037a commit 1a5fd44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/utils/search/documentEmbeddings/exactText.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function exactTextSearch(document, query) {
const matchingVectorIds = await findTextInDoc(document, query);
if (matchingVectorIds.length === 0) return { fragments: [], error: null };

const queryString = matchingVectorIds.map((vid) => `'${vid}'`).join(",");
const queryString = matchingVectorIds.map((vid) => vid);
const fragments = await DocumentVectors.where(
{ vectorId: { in: queryString } },
100
Expand Down
2 changes: 1 addition & 1 deletion backend/utils/search/documentEmbeddings/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function metadataSearch(document, query) {
const matchingVectorIds = await findKeyValueInDoc(document, query);
if (matchingVectorIds.length === 0) return { fragments: [], error: null };

const queryString = matchingVectorIds.map((vid) => `'${vid}'`).join(",");
const queryString = matchingVectorIds.map((vid) => vid);
const fragments = await DocumentVectors.where(
{ vectorId: { in: queryString } },
100
Expand Down

0 comments on commit 1a5fd44

Please sign in to comment.