mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-27 12:51:41 +00:00
Fix indexing off not working for SQL and graph free tier accounts (#85)
This commit is contained in:
@@ -18,6 +18,7 @@ export class CreateSqlCollectionUtilities {
|
||||
databaseId: string,
|
||||
analyticalStorageTtl: number,
|
||||
collectionId: string,
|
||||
indexingPolicy: DataModels.IndexingPolicy,
|
||||
offerThroughput: number,
|
||||
partitionKey: string,
|
||||
partitionKeyVersion: number,
|
||||
@@ -41,6 +42,7 @@ export class CreateSqlCollectionUtilities {
|
||||
rg,
|
||||
dba,
|
||||
analyticalStorageTtl,
|
||||
indexingPolicy,
|
||||
partitionKeyVersion
|
||||
};
|
||||
|
||||
@@ -75,6 +77,10 @@ export class CreateSqlCollectionUtilities {
|
||||
rpPayloadToCreateCollection.properties.resource.analyticalStorageTtl = params.analyticalStorageTtl;
|
||||
}
|
||||
|
||||
if (params.indexingPolicy) {
|
||||
rpPayloadToCreateCollection.properties.resource.indexingPolicy = params.indexingPolicy;
|
||||
}
|
||||
|
||||
if (!params.st) {
|
||||
if (rpOptions) {
|
||||
rpPayloadToCreateCollection.properties.options = rpOptions;
|
||||
@@ -117,6 +123,7 @@ export class CreateCollectionUtilities {
|
||||
armEndpoint: string,
|
||||
databaseId: string,
|
||||
collectionId: string,
|
||||
indexingPolicy: DataModels.IndexingPolicy,
|
||||
offerThroughput: number,
|
||||
partitionKey: string,
|
||||
partitionKeyVersion: number,
|
||||
@@ -137,6 +144,7 @@ export class CreateCollectionUtilities {
|
||||
sid,
|
||||
rg,
|
||||
dba,
|
||||
indexingPolicy,
|
||||
partitionKeyVersion
|
||||
};
|
||||
|
||||
@@ -167,6 +175,10 @@ export class CreateCollectionUtilities {
|
||||
}
|
||||
};
|
||||
|
||||
if (params.indexingPolicy) {
|
||||
rpPayloadToCreateCollection.properties.resource.indexingPolicy = params.indexingPolicy;
|
||||
}
|
||||
|
||||
if (!params.st) {
|
||||
if (rpOptions) {
|
||||
rpPayloadToCreateCollection.properties.options = rpOptions;
|
||||
|
||||
Reference in New Issue
Block a user