I am trying to remove the default indexes which are created for a new collection:
{
\"indexingMode\": \"lazy\",
\"automatic\": true,
\"includedPaths\":
An easy way to exclude everything would be to switch indexingMode: None
Sounds like you've pretty much figured it out. To clarify, id and _ts are treated as special properties in regards to indexing.
id is implicitly treated as the document's primary key - in which, id will always be indexed with uniqueness enforced.
_ts is an epoch timestamp of when a document was last written (create or replace), and will also always be indexed. This property will be explicitly noted within the index policy.
The following indexing policy illustrated how to index only the document.prop.subprop property (along with id and _ts):
{
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/prop/subprop/?",
"indexes": [
{
"kind": "Range",
"dataType": "Number",
"precision": -1
},
{
"kind": "Range",
"dataType": "String",
"precision": -1
}
]
},
{
"path": "/\"_ts\"/?",
"indexes": [
{
"kind": "Range",
"dataType": "Number",
"precision": -1
},
{
"kind": "Hash",
"dataType": "String",
"precision": 3
}
]
}
],
"excludedPaths": [
{
"path": "/*"
}
]
}