1.

Can I Change The Indexing Policy?

Answer»

Yes, you can change the indexing policy by providing the index definition. For more information, see Azure Cosmos DB capabilities. You need to properly encode and escape the settings.

For the non-.NET SDKs the indexing policy can only be set in the portal at Data Explorer, navigate to the SPECIFIC table you want to change and then go to the Scale & Settings->Indexing Policy, make the desired change and then Save.

From the .NET SDK it can be submitted in the app.config file:

Copy

{

"indexing Mode": "consistent",

"automatic": TRUE,

"INCLUDED Paths": [

{

"path": "/some path",

"indexes": [

{

"kind": "RANGE",

"datatype": "Number",

"precision": -1

},

{

"kind": "Range",

"datatype": "String",

"precision": -1

]

}

],

"excludedPaths": 

[

 {

"path": "/anotherpath"

 }

]

}

Yes, you can change the indexing policy by providing the index definition. For more information, see Azure Cosmos DB capabilities. You need to properly encode and escape the settings.

For the non-.NET SDKs the indexing policy can only be set in the portal at Data Explorer, navigate to the specific table you want to change and then go to the Scale & Settings->Indexing Policy, make the desired change and then Save.

From the .NET SDK it can be submitted in the app.config file:

Copy

{

"indexing Mode": "consistent",

"automatic": true,

"included Paths": [

{

"path": "/some path",

"indexes": [

{

"kind": "Range",

"datatype": "Number",

"precision": -1

},

{

"kind": "Range",

"datatype": "String",

"precision": -1

]

}

],

"excludedPaths": 

[

 {

"path": "/anotherpath"

 }

]

}



Discussion

No Comment Found