Skip to content

Commit

Permalink
fix(indexer): roll back to @azure/search-document beta3
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied authored and anfibiacreativa committed Oct 19, 2023
1 parent 7763591 commit 3198fc4
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 44 deletions.
100 changes: 66 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@azure/identity": "^3.3.0",
"@azure/monitor-opentelemetry": "^1.0.0-beta.2",
"@azure/search-documents": "~12.0.0-beta.4",
"@azure/search-documents": "12.0.0-beta.3",
"@azure/storage-blob": "^12.15.0",
"@dqbd/tiktoken": "^1.0.7",
"@fastify/autoload": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/indexer/src/lib/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class Indexer {
sortable: false,
facetable: false,
vectorSearchDimensions: 1536,
vectorSearchProfile: 'default',
vectorSearchConfiguration: 'default',
},
{
name: 'category',
Expand Down Expand Up @@ -103,7 +103,7 @@ export class Indexer {
],
},
vectorSearch: {
algorithms: [
algorithmConfigurations: [
{
name: 'default',
kind: 'hnsw',
Expand Down
2 changes: 1 addition & 1 deletion packages/search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"@azure/identity": "^3.3.0",
"@azure/monitor-opentelemetry": "^1.0.0-beta.2",
"@azure/search-documents": "~12.0.0-beta.4",
"@azure/search-documents": "12.0.0-beta.3",
"@azure/storage-blob": "^12.15.0",
"@dqbd/tiktoken": "^1.0.7",
"@fastify/autoload": "^5.0.0",
Expand Down
10 changes: 4 additions & 6 deletions packages/search/src/lib/approaches/approach-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ export class ApproachBase {
semanticConfiguration: 'default',
top,
captions: useSemanticCaption ? 'extractive|highlight-false' : undefined,
vectorQueries: [
vectors: [
{
vector: queryVector,
kind: 'vector',
value: queryVector,
kNearestNeighborsCount: queryVector ? 50 : undefined,
fields: queryVector ? ['embedding'] : undefined,
},
Expand All @@ -63,10 +62,9 @@ export class ApproachBase {
: this.search.search(queryText, {
filter,
top,
vectorQueries: [
vectors: [
{
vector: queryVector,
kind: 'vector',
value: queryVector,
kNearestNeighborsCount: queryVector ? 50 : undefined,
fields: queryVector ? ['embedding'] : undefined,
},
Expand Down

0 comments on commit 3198fc4

Please sign in to comment.