Skip to content

Commit

Permalink
fix: deployment error (fixes #161)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Mar 21, 2024
1 parent bbfbd46 commit d9f4f11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infra/main.bicep
Expand Up @@ -152,7 +152,7 @@ module searchApi './core/host/container-app.bicep' = {
tags: union(tags, { 'azd-service-name': searchApiName })
containerAppsEnvironmentName: containerApps.outputs.environmentName
containerRegistryName: containerApps.outputs.registryName
identityType: 'SystemAssigned'
identityName: '${abbrs.managedIdentityUserAssignedIdentities}search-api-${resourceToken}'
allowedOrigins: allowedOrigins
containerCpuCoreCount: '1.0'
containerMemory: '2.0Gi'
Expand Down Expand Up @@ -219,7 +219,7 @@ module indexerApi './core/host/container-app.bicep' = {
tags: union(tags, { 'azd-service-name': indexerApiName })
containerAppsEnvironmentName: containerApps.outputs.environmentName
containerRegistryName: containerApps.outputs.registryName
identityType: 'SystemAssigned'
identityName: '${abbrs.managedIdentityUserAssignedIdentities}indexer-api-${resourceToken}'
containerCpuCoreCount: '1.0'
containerMemory: '2.0Gi'
secrets: [
Expand Down
4 changes: 4 additions & 0 deletions packages/indexer/src/lib/document-processor.ts
Expand Up @@ -75,6 +75,10 @@ export class DocumentProcessor {
let start = 0;
let end = length;

if (end <= MAX_SECTION_LENGTH) {
return [{ content: allText, page: findPage(0) }];
}

while (start + SECTION_OVERLAP < length) {
let lastWord = -1;
end = start + MAX_SECTION_LENGTH;
Expand Down

0 comments on commit d9f4f11

Please sign in to comment.