Граф коммитов

18 Коммитов

Автор SHA1 Сообщение Дата
Manik Khandelwal cae13bb96a
[Cosmos] JS SDK support for partitioned DiskANN (#31839)
### 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>
2024-11-19 23:45:35 +05:30
Ujjwal Soni 68408891a9
Samples for fts (#31829) 2024-11-19 17:49:18 +05:30
Jeremy Meng d5f6d677ec [EngSys] standardize OSS copyright header
- [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"
2024-08-27 13:01:38 -07:00
aditishree1 9646966abc
[cosmos] Computed Property V4sample (#30649)
### 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>
2024-08-06 00:02:02 +05:30
aditishree1 cd9baf8802
[cosmos] Adds v4 samples (#29316)
### 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>
2024-08-01 07:32:16 -07:00
Manik Khandelwal 9a9ac5b1d3
[Cosmos] Vector Search feature (#29946)
### 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>
2024-07-18 06:27:53 -07:00
Jeremy Meng 12b4dcc257 [EngSys] upgrade to prettier v3
***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.
2024-01-10 18:45:01 -05:00
vikas singh 18d4d40e12
Adding samples for Diagnostic and Hierarchical Partitioning. (#27029)
### 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)
2023-09-06 12:36:34 +00:00
Aman Rao 0ae550eab9
Changefeed Pull Model Implementation (#26425)
### 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)
2023-08-30 13:57:40 +05:30
Jeremy Meng 191e4ce330 [EngSys] prepare for upgrading TypeScript to v4.6
Before upgrading we want to address the breaking change of catch variable now
defaulting to `unkown` by explicitly specify `: any` for implicit `any` catch
variables in our code base.

This commit applies the result of running the following codemod (credit: Maor)

```ts
import { API, FileInfo } from "jscodeshift";
export default function transformer(file: FileInfo, api: API) {
  const j = api.jscodeshift;
  const code = j(file.source);
  code
    .find(j.CatchClause)
    .filter(({ node }) => {
      return node.param && node.param.type == "Identifier" && !node.param.typeAnnotation;
    })
    .forEach(({ node }) => {
      if (node.param.type == "Identifier") {
        node.param.typeAnnotation = j.tsTypeAnnotation(j.tsAnyKeyword());
      }
    });
  return code.toSource();
}
```
2022-04-19 12:11:57 -07:00
Jonathan Cárdenas c26f9c2ba3
Update prettier dev-dependency to v2.5.1 in Cosmos DB (#19506)
* Upgrade prettier version

* Format files

* rebuild cosmos, updating cosmos.api.md
2022-01-04 21:04:32 -06:00
Will Temple 2103dfa84a
[cosmosdb] Update samples. (#19498)
* [cosmosdb] Update samples.

* Update sdk/cosmosdb/cosmos/samples/v3/typescript/tsconfig.json
2021-12-21 17:52:02 -05:00
Azure SDK Bot 0ece348c43
Post release automated changes for cosmosdb releases (#19079)
Post release automated changes for azure-cosmos
2021-12-09 19:31:28 +00:00
Sajeetharan 9e1c56fa58
Samples: Adds JSON Patch API to samples (#18928)
* add samples for patch

* apply format fix
2021-12-02 17:54:01 -08:00
Sajeetharan 318c0c3482
fix integration tests - v3.15.0 (#18849)
- fix failed integration tests ( mainly because of the constant "REPLACE_SDK_VERSION")
2021-12-01 16:08:52 +00:00
Sajeetharan 8ac6801201
fix sample errors and update release CHANGELOG.md (#18768)
* fix sample errors and update release CHANGELOG.md

* Ran experimental sample generation.

* update CHANGELOG.md and package.json

Co-authored-by: Will Temple <witemple@microsoft.com>
2021-11-23 07:25:13 -08:00
Sajeetharan 308309a08c
Fix Cosmos Samples (#18623)
* fix cosmos samples

* add Families.json

* samples 'strict' mode fix

* add assets folder

* fixes on the strict mode issues

* update assets path in samples-dev

* add generated samples via dev tool

* fix PR comments

* upgrade @azure/identity to identity v2

* fix lint issues

* [cosmosdb] Experimental sample generation

Co-authored-by: Will Temple <witemple@microsoft.com>
2021-11-16 14:34:41 -05:00
Zachary Foster 27ca49b1c6
[Cosmos] Migrate to samples v2 (#16486)
* samples v2 wip

* Fix more types

* Samples v2 migration

* sample CI readme

* more samples fixes

* fix link

* Fix broken links in sample output

* Fix lint, tsdoc ignored

* undo lint fix changes

* remove from lint

* Redo directories

* key

* skipFolder true

* Skip

* move skip to top

* Finish samples renames and locatings

* Try filename

* Fix path
2021-08-13 11:22:04 -04:00