### Packages impacted by this PR
@azure/cosmos
### Describe the problem that is addressed by this PR
In this PR we are adding three optional parameters in the Indexing
Policy in the vector Index to support partitioned DiskANN. The three
optional parameters are:
quantizationByteSize : The number of bytes used in product quantization
of the vectors.This is an optional parameter and applies to index types
DiskANN and quantizedFlat. The allowed range for this parameter is
between 1 and 200.
vectorIndexShardKey : The list of string containing the shard keys used
for partitioning the vector indexes. This is an optional parameter and
applies to index types DiskANN and quantizedFlat.
indexingSearchListSize : The size of the candidate list of approximate
neighbors stored while building the diskANN index as part of the
optimization processes.This is an optional parameter and applies to
index type DiskANN only. The allowed range is between 25 and 500.
The changes have been tested using a Test account, since as of now the
backend changes aren't live yet.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
Yes
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
---------
Co-authored-by: Ujjwal Soni <soniujjwal@microsoft.com>
Co-authored-by: Manik Khandelwal <mkhandelwal@microsoft.com>
- [eslint-plugin] github-source-headers rule should use "MIT License".
This change updates our linter rule and the whole repository to have consistent
license header.
***NO_CI***
- remove "All rights reserved." from header
- "MIT license" => "MIT License"
### Packages impacted by this PR
@azure/cosmos
### Issues associated with this PR
This PR adds sample for updating computed properties of an existing
container
### Describe the problem that is addressed by this PR
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
---------
Co-authored-by: Aditishree . <adlnu@microsoft.com>
### Packages impacted by this PR
@azure/cosmos
### Issues associated with this PR
### Describe the problem that is addressed by this PR
This PR generates v4 samples and removes v4 features from v3 sample
folder.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
---------
Co-authored-by: Aditishree . <adlnu@microsoft.com>
### Packages impacted by this PR
@azure/cosmos
### Issues associated with this PR
This PR adds vector indexes, vector embedding policy and vector queries
to enable Vector Similarity Search in Cosmos DB.
The vector embedding policy, part of the container-level settings,
includes details like the dimensions of embeddings, their data type, and
the method used to measure similarity between vectors.
Additionally, it introduces a new feature called Vector Indexes in the
Indexing policy, similar to composite or spatial indexes. These indexes
specify which paths are indexed and the type of indexing applied for
improved search performance.
This PR also contains sample about the usage of these newly introduced
fields.
### Describe the problem that is addressed by this PR
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
yes
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
---------
Co-authored-by: Manik Khandelwal <mkhandelwal@microsoft.com>
Co-authored-by: Aman Rao <amanrao@microsoft.com>
***NO_CI***
- remove dev dependency `prettier` from non-tool packages when possible and
update them to run vendored prettier for `check-format` and `format` scripts
- upgrade rest of packages to prettier v3
- run `rush format` for all rush packages
This is a follow-up to https://github.com/Azure/azure-sdk-for-js/pull/28127 to
move the rest of repo to prettier v3.
### Packages impacted by this PR
@azure/cosmos
### Issues associated with this PR
Adding samples for Diagnostic and Hierarchical Partitioning.
### Describe the problem that is addressed by this PR
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
@azure/cosmos
### Issues associated with this PR
https://github.com/Azure/azure-sdk-for-js/issues/18062
### Describe the problem that is addressed by this PR
This PR implements changefeed pull model in JS SDK.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
This PR implements changefeed as an infinite feed which keeps on
checking if there are any new changes.
Changefeed pull model has 3 types.
- Changefeed for Entire Container.
- Changefeed for an Epk Range.
- Changefeed for a partition key.
Start points:
- Start from Beginning
- Start from Now
- Start from a Time
- Start from Continuation token
Based on changefeed resource and start point, different change feed
modes can be selected.
Eg.
- ```ChangeFeedStartFrom.Beginning()``` -> Change feed for entire
container from beginning.
- ```ChangeFeedStartFrom.Now(partitionKey)``` -> Change feed for a given
partition key from now.
- ```ChangeFeedStartFrom.Time(new Date(someDate), epkRange)``` -> Change
feed for a given epk range from a given point of time.
- ```ChangeFeedStartFrom.Continuation(continuation)``` -> Changefeed
from a save point. No need to pass resource in this.
Note: If none of ChangeFeedStartFrom is provided, then change feed is
fetched for an entire container from Now().
```
const options: ChangeFeedIteratorOptions = {
maxItemCount: 10,
changeFeedStartFrom: ChangeFeedStartFrom.Beginning()
....
}
const iterator = container.items.getChangeFeedIterator(options)
while(iterator.hasMoreResults) {
const res = await iterator.readNext();
//process result
}
```
Changefeed for entire container and Epk ranges implements a queue
consisting of all the feed ranges overlapping and keeps checking for new
changes for each feed range.
Once we reach the feed range for which last positive was fetched, and
there are no new changes present, 304 is returned to the user and whole
process starts again.
Continuation Token format for example:
`{"rid":"containerRid","Continuation":[{"minInclusive":"","maxExclusive":"05C1E7FFFFFFFE","continuationToken":"
value of continuation token for this feed
range"},{"minInclusive":"05C1E7FFFFFFFE","maxExclusive":"FF","continuationToken":"
value of continuation token for this feed range"}]}`
Continuation Token for a partition Key:
`{"rid":"containerRid", "partitionKey": "somePartitionKey",
Continuation: "some continuation value string" }`
Custom Epk ranges are also supported i.e. minInclusive and maxExclusive
need not to overlap exactly with epk range of a physical partition.
More detailed comments are present in the code.
### Are there test cases added in this PR? _(If not, why?)_
Yes
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)