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

[Cosmos] Adds full text policy and full text indexes #37891

Merged
merged 8 commits into from
Nov 15, 2024

Conversation

simorenoh
Copy link
Member

@simorenoh simorenoh commented Oct 15, 2024

This PR adds the functionality, samples and tests for creating and replacing containers with full text policies and full text indexes for the SDK.

A sample full text policy looks like this:

full_text_policy = {
    "defaultLanguage": "en-US",
    "fullTextPaths": [
        {
            "path": "/text",
            "language": "en-US"
        }
    ]
}

For the indexing bit, we now simply accept fullTextIndexes to the existing indexing policy:

indexing_policy = {
    "automatic": True,
    "indexingMode": "consistent",
    "compositeIndexes": [
        [
            {"path": "/numberField", "order": "ascending"},
            {"path": "/stringField", "order": "descending"}
        ]
    ],
    "fullTextIndexes": [
        {"path": "/text"}
    ]
}

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-cosmos

@simorenoh simorenoh marked this pull request as ready for review November 5, 2024 21:25
@simorenoh simorenoh requested review from annatisch and a team as code owners November 5, 2024 21:25
Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - but left few comments that need to be addressed before merging.

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks!

@simorenoh simorenoh merged commit 4c67ca7 into Azure:main Nov 15, 2024
21 checks passed
@simorenoh simorenoh deleted the fts-cosmos-sdk branch November 15, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants