Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexingPolicyFile Equivalent ? #109

Open
DadvDadv opened this issue Feb 1, 2024 · 1 comment
Open

IndexingPolicyFile Equivalent ? #109

DadvDadv opened this issue Feb 1, 2024 · 1 comment

Comments

@DadvDadv
Copy link

DadvDadv commented Feb 1, 2024

Before we have a settings name "IndexingPolicyFile" where we can set a specific file for configurate indexing policy in Cosmos Db.

I didn't find any equivalent in the new core project or extension.

How could I have the policy inserted before the data integration (json => cosmos db) ?

@DadvDadv
Copy link
Author

DadvDadv commented Feb 1, 2024

I finaly add it directly in the Comos Extension :

CosmosSettingsBase.cs :
public IndexingPolicy? IndexingPolicy { get; set; }

CosmosDataSinkExtension.cs :

var containerProperties = new ContainerProperties { Id = settings.Container, PartitionKeyDefinitionVersion = PartitionKeyDefinitionVersion.V2 }; if(settings.IndexingPolicy != null) containerProperties.IndexingPolicy = settings.IndexingPolicy; //add the policy

migrationsettings.json :

"SinkSettings": { "IndexingPolicy": { "indexingMode": "consistent", "automatic": true, "includedPaths": [], "excludedPaths": [ { "path": "/*" }, { "path": "/\"_etag\"/?" } ] } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant