Skip to content

Commit 3638228

Browse files
aayush3011azure-sdkanuchandyv-durgeshsVinothini Dharmaraj
authored
[Cosmos][VectorIndex]Adding changes for vectorIndex and vectorEmbeddingPolicy (#39379)
* Adding changes for vectorIndex and vectorEmbeddingPolicy * Adding some necessary comments * Adding test case * updating enum values * Updating test case * Updating test case * Updating test case * updating changelog * Updating test case * Resolving comments * Resolving comments * Fixing test case * Resolving comments * Resolving Comments * Fixing build issues * Resolving comments * Resolving Comments * [Cosmos][VectorIndex]Adding changes for vectorIndex and vectorEmbeddingPolicy (#40004) * Adding changes for vectorIndex and vectorEmbeddingPolicy * Adding some necessary comments * Adding test case * updating enum values * Updating test case * Updating test case * Updating test case * updating changelog * Updating test case * Resolving comments * Resolving comments * Fixing test case * Resolving comments * Resolving Comments * Fixing build issues * Resolving comments * Resolving Comments * [Cosmos][VectorSearch] Non Streaming Order By Query (#40085) * Increment versions for core releases (#40003) Increment package versions for core releases * Ensure ServiceBus session idle timeout fall back to retry-options::try-timeout (#39994) * Added Alpha3 Java Media Streaming Events (#40002) * Added Alpha3 Java Media Streaming Events * updating readme to add the media streaming events to remove model --------- Co-authored-by: Vinothini Dharmaraj <[email protected]> * Update version of github-event-processor to 1.0.0-dev.20240502.2 (#40012) Co-authored-by: James Suplizio <[email protected]> * Prepare May 2024 Identity Release (#40006) * Prepare Identity Broker May 2024 Release (#40014) * Increment package versions for identity releases (#40015) * [JobRouter] SDK Review updates (#40011) * SDK Review updates * Update auto-generated models * Add customization * Fix customization * Update package * Update tests * Linting * FixFaultInjectionRuleFailedToApplyPerPartitionInGatewayMode (#40005) * fix fault injection rule failed to apply per partition in gateway mode --------- Co-authored-by: annie-mac <[email protected]> * azure-cosmos-test_1.0.0.beta.7Release (#40021) * release azure-cosmos-test 1.0.0.beta.7 --------- Co-authored-by: annie-mac <[email protected]> --------- Co-authored-by: Azure SDK Bot <[email protected]> Co-authored-by: Anu Thomas Chandy <[email protected]> Co-authored-by: v-durgeshs <[email protected]> Co-authored-by: Vinothini Dharmaraj <[email protected]> Co-authored-by: James Suplizio <[email protected]> Co-authored-by: Bill Wert <[email protected]> Co-authored-by: williamzhao87 <[email protected]> Co-authored-by: Annie Liang <[email protected]> Co-authored-by: annie-mac <[email protected]> * [Cosmos][VectorSearch] Non Streaming Order By Query (#40096) * Initial changes * Initial changes * Increment versions for core releases (#40003) Increment package versions for core releases * Ensure ServiceBus session idle timeout fall back to retry-options::try-timeout (#39994) * Added Alpha3 Java Media Streaming Events (#40002) * Added Alpha3 Java Media Streaming Events * updating readme to add the media streaming events to remove model --------- Co-authored-by: Vinothini Dharmaraj <[email protected]> * Update version of github-event-processor to 1.0.0-dev.20240502.2 (#40012) Co-authored-by: James Suplizio <[email protected]> * Prepare May 2024 Identity Release (#40006) * Prepare Identity Broker May 2024 Release (#40014) * Increment package versions for identity releases (#40015) * [JobRouter] SDK Review updates (#40011) * SDK Review updates * Update auto-generated models * Add customization * Fix customization * Update package * Update tests * Linting * FixFaultInjectionRuleFailedToApplyPerPartitionInGatewayMode (#40005) * fix fault injection rule failed to apply per partition in gateway mode --------- Co-authored-by: annie-mac <[email protected]> * azure-cosmos-test_1.0.0.beta.7Release (#40021) * release azure-cosmos-test 1.0.0.beta.7 --------- Co-authored-by: annie-mac <[email protected]> * Fixed existsById API in ReactiveCosmosTemplate (#40022) * Fixed existsById API in ReactiveCosmosTemplate * Added changelog * Initial changes * Initial changes * Skip Recorded test and delete Event record until test proxy to work with Event recordings (#40029) Co-authored-by: Min Woo Lee 🧊 <[email protected]> * Fix invalid CODEOWNERS (#40032) * Initial changes * ServiceBus: fix session tracing (#39962) * remove additional matrix * Fix session processing and disposition instrumentation * return matrix config * review suggestions * [Automation] Generate SDK based on TypeSpec 0.15.15 (#40048) * [CODEOWNERS] Updates for org changes (#40049) * [CODEOWNERS] Updates for org changes The focus of these changes is to remove an individual who no longer is responsible for the products which their GH account is associated to. * Move from using the docker image to java2docfx for docs validation (#39744) * Move from using the docker image to java2docfx for docs validation * Temporarily turn on docs processing for template libraries for testing * Actually install the rex validation tool * Fix the if not Test-Path statement * Update java2docfx version and add a couple of diagnostics output lines * Add missing close paren * Ensure that Sort-Object always returns an array even if there's only one item * add another piece of diagnostics output * trying one more thing * remove some diag, add other * Remove the additional diagnostics, add permanent output message * Invoke java -jar on java2docfx to show the help command to ensure the install is okay * fiddling with the java -jar command * Set the working directory to the java2docfx directory before executing the mvn dependency download * Actually create the directory before trying to set location...oops * Update rex validation to verify MAVEN_HOME is set * Updates for Java PR 39875 which had changes from this PR that were more immediate * Update java2docfx version * remove check for MAVEN_HOME which was only for testing * Update the version of java2docfx to test a fix * Update version of java2docfx to 1.0.4 * revert template's ci.yml changes that were only necessary to test java2docfx * owners (#39686) * Use ClientLogger in testing output (#40010) Use ClientLogger in testing output * Fix null pointer exception and context usage (#40053) * Rename AML to AzureMachineLearning (#40056) * Fixed the Key Vault `test-resources.json` file to properly configure a deployment script for certificate creation. (#40037) * Close response body in bearer policy (#40052) * Running Prepare-Release for azure-messaging-servicebus 7.17.0 (#40058) * mgmt, TypeSpec code generation pipeline (#39963) * typespec generation pipeline echo command PR_TITLE * generation typespec Update generation.yml for Azure Pipelines Update generation.yml for Azure Pipelines Update generation.yml for Azure Pipelines * remove typespec pipeline file * fix pr title * address comments * Add codeowner linter owners (#39997) * Update to ESRP task version that supports federated auth (#40059) * Increment package versions for cosmos releases (#40031) * Update azure-sdk-build-tools Repository Resource Refs in Yaml files (#39627) * Add reduced embeddings sample to azure-search-documents (#40069) * Add reduced embeddings sample * Fix cspell * Fix link * Search May Preview Regen Updates (#40057) * Search May Preview Regeneration - Still need to add varargs convenience * Removing ovveride statements from `setFields` for `VectorizableImageUrlQuery` and `VectorizableImageBinaryQuery` * Removing ovveride statements from `setFields` for `VectorizableImageUrlQuery` and `VectorizableImageBinaryQuery` * adding varargs * Additional adjustments to FieldBuilder and Search Index Customizations * Updating cspell.json * Adjust `SearchScoreThreshold` customization Re-enable code generation in CI * Updates: - Updated Cspell - Rename `maxStoragePerIndex` property to `maxStoragePerIndexInBytes` in SearchServiceLimits - Set `hybridSearch` property to be type `HybridSearch` in SearchRequest - Add `hybridSearch` to SearchOptions and `SearchAsyncClient.createSearchRequest()` * Adding Support and testing byte[] and List<byte> within field builder * Fix linting --------- Co-authored-by: alzimmermsft <[email protected]> * Preparing Search May 2024 Beta Release (#40071) * Preparing Search May 2024 Beta Release * Preparing Search May 2024 Beta Release * Resolving comments * Fixing build issues * eng, update autorest.java, improve error output in sdk automation (#40073) * improve error output * autorest.java 4.1.29 * Merge to main after spring cloud azure 4.18.0 released (#40075) * Prepare for Spring Cloud Azure 4.18.0 release (#40063) * update version client * update version/changelog/readme * update changelog * Increment versions for spring releases (#40074) * Increment package versions for spring releases * Update version_client.txt * Update pom.xml --------- Co-authored-by: Muyao Feng <[email protected]> --------- Co-authored-by: Azure SDK Bot <[email protected]> * Miscellaneous Core performance improvements (#39552) Miscellaneous Core performance improvements * Increment package versions for search releases (#40072) * Update io.fabric8:kubernetes-client (#40086) 5.12.3 -> 6.12.1 * Increment package versions for servicebus releases (#40094) * Emit stable auto-instrumented otel metrics (#39960) * Update otel metrics logic * add runtime metrics * adding a few metrics I forgot * small correction * Update * Fix * Update * Delete pre-stable metrics --------- Co-authored-by: Harsimar Kaur (from Dev Box) <[email protected]> --------- Co-authored-by: Azure SDK Bot <[email protected]> Co-authored-by: Anu Thomas Chandy <[email protected]> Co-authored-by: v-durgeshs <[email protected]> Co-authored-by: Vinothini Dharmaraj <[email protected]> Co-authored-by: James Suplizio <[email protected]> Co-authored-by: Bill Wert <[email protected]> Co-authored-by: williamzhao87 <[email protected]> Co-authored-by: Annie Liang <[email protected]> Co-authored-by: annie-mac <[email protected]> Co-authored-by: Kushagra Thapar <[email protected]> Co-authored-by: minwoolee-msft <[email protected]> Co-authored-by: Min Woo Lee 🧊 <[email protected]> Co-authored-by: Alan Zimmer <[email protected]> Co-authored-by: Liudmila Molkova <[email protected]> Co-authored-by: Jesse Squire <[email protected]> Co-authored-by: Harsimar Kaur <[email protected]> Co-authored-by: vcolin7 <[email protected]> Co-authored-by: Xiaofei Cao <[email protected]> Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Patrick Hallisey <[email protected]> Co-authored-by: Jair Myree <[email protected]> Co-authored-by: Weidong Xu <[email protected]> Co-authored-by: Muyao Feng <[email protected]> Co-authored-by: Helen <[email protected]> Co-authored-by: Harsimar Kaur (from Dev Box) <[email protected]> * [Cosmos][VectorSearch] Non Streaming Order By Query (#40098) * Initial changes * Initial changes * Increment versions for core releases (#40003) Increment package versions for core releases * Ensure ServiceBus session idle timeout fall back to retry-options::try-timeout (#39994) * Added Alpha3 Java Media Streaming Events (#40002) * Added Alpha3 Java Media Streaming Events * updating readme to add the media streaming events to remove model --------- Co-authored-by: Vinothini Dharmaraj <[email protected]> * Update version of github-event-processor to 1.0.0-dev.20240502.2 (#40012) Co-authored-by: James Suplizio <[email protected]> * Prepare May 2024 Identity Release (#40006) * Prepare Identity Broker May 2024 Release (#40014) * Increment package versions for identity releases (#40015) * [JobRouter] SDK Review updates (#40011) * SDK Review updates * Update auto-generated models * Add customization * Fix customization * Update package * Update tests * Linting * FixFaultInjectionRuleFailedToApplyPerPartitionInGatewayMode (#40005) * fix fault injection rule failed to apply per partition in gateway mode --------- Co-authored-by: annie-mac <[email protected]> * azure-cosmos-test_1.0.0.beta.7Release (#40021) * release azure-cosmos-test 1.0.0.beta.7 --------- Co-authored-by: annie-mac <[email protected]> * Fixed existsById API in ReactiveCosmosTemplate (#40022) * Fixed existsById API in ReactiveCosmosTemplate * Added changelog * Initial changes * Initial changes * Skip Recorded test and delete Event record until test proxy to work with Event recordings (#40029) Co-authored-by: Min Woo Lee 🧊 <[email protected]> * Fix invalid CODEOWNERS (#40032) * Initial changes * ServiceBus: fix session tracing (#39962) * remove additional matrix * Fix session processing and disposition instrumentation * return matrix config * review suggestions * [Automation] Generate SDK based on TypeSpec 0.15.15 (#40048) * [CODEOWNERS] Updates for org changes (#40049) * [CODEOWNERS] Updates for org changes The focus of these changes is to remove an individual who no longer is responsible for the products which their GH account is associated to. * Move from using the docker image to java2docfx for docs validation (#39744) * Move from using the docker image to java2docfx for docs validation * Temporarily turn on docs processing for template libraries for testing * Actually install the rex validation tool * Fix the if not Test-Path statement * Update java2docfx version and add a couple of diagnostics output lines * Add missing close paren * Ensure that Sort-Object always returns an array even if there's only one item * add another piece of diagnostics output * trying one more thing * remove some diag, add other * Remove the additional diagnostics, add permanent output message * Invoke java -jar on java2docfx to show the help command to ensure the install is okay * fiddling with the java -jar command * Set the working directory to the java2docfx directory before executing the mvn dependency download * Actually create the directory before trying to set location...oops * Update rex validation to verify MAVEN_HOME is set * Updates for Java PR 39875 which had changes from this PR that were more immediate * Update java2docfx version * remove check for MAVEN_HOME which was only for testing * Update the version of java2docfx to test a fix * Update version of java2docfx to 1.0.4 * revert template's ci.yml changes that were only necessary to test java2docfx * owners (#39686) * Use ClientLogger in testing output (#40010) Use ClientLogger in testing output * Fix null pointer exception and context usage (#40053) * Rename AML to AzureMachineLearning (#40056) * Fixed the Key Vault `test-resources.json` file to properly configure a deployment script for certificate creation. (#40037) * Close response body in bearer policy (#40052) * Running Prepare-Release for azure-messaging-servicebus 7.17.0 (#40058) * mgmt, TypeSpec code generation pipeline (#39963) * typespec generation pipeline echo command PR_TITLE * generation typespec Update generation.yml for Azure Pipelines Update generation.yml for Azure Pipelines Update generation.yml for Azure Pipelines * remove typespec pipeline file * fix pr title * address comments * Add codeowner linter owners (#39997) * Update to ESRP task version that supports federated auth (#40059) * Increment package versions for cosmos releases (#40031) * Update azure-sdk-build-tools Repository Resource Refs in Yaml files (#39627) * Add reduced embeddings sample to azure-search-documents (#40069) * Add reduced embeddings sample * Fix cspell * Fix link * Search May Preview Regen Updates (#40057) * Search May Preview Regeneration - Still need to add varargs convenience * Removing ovveride statements from `setFields` for `VectorizableImageUrlQuery` and `VectorizableImageBinaryQuery` * Removing ovveride statements from `setFields` for `VectorizableImageUrlQuery` and `VectorizableImageBinaryQuery` * adding varargs * Additional adjustments to FieldBuilder and Search Index Customizations * Updating cspell.json * Adjust `SearchScoreThreshold` customization Re-enable code generation in CI * Updates: - Updated Cspell - Rename `maxStoragePerIndex` property to `maxStoragePerIndexInBytes` in SearchServiceLimits - Set `hybridSearch` property to be type `HybridSearch` in SearchRequest - Add `hybridSearch` to SearchOptions and `SearchAsyncClient.createSearchRequest()` * Adding Support and testing byte[] and List<byte> within field builder * Fix linting --------- Co-authored-by: alzimmermsft <[email protected]> * Preparing Search May 2024 Beta Release (#40071) * Preparing Search May 2024 Beta Release * Preparing Search May 2024 Beta Release * Resolving comments * Fixing build issues * eng, update autorest.java, improve error output in sdk automation (#40073) * improve error output * autorest.java 4.1.29 * Merge to main after spring cloud azure 4.18.0 released (#40075) * Prepare for Spring Cloud Azure 4.18.0 release (#40063) * update version client * update version/changelog/readme * update changelog * Increment versions for spring releases (#40074) * Increment package versions for spring releases * Update version_client.txt * Update pom.xml --------- Co-authored-by: Muyao Feng <[email protected]> --------- Co-authored-by: Azure SDK Bot <[email protected]> * Miscellaneous Core performance improvements (#39552) Miscellaneous Core performance improvements * Increment package versions for search releases (#40072) * Update io.fabric8:kubernetes-client (#40086) 5.12.3 -> 6.12.1 * Increment package versions for servicebus releases (#40094) * Emit stable auto-instrumented otel metrics (#39960) * Update otel metrics logic * add runtime metrics * adding a few metrics I forgot * small correction * Update * Fix * Update * Delete pre-stable metrics --------- Co-authored-by: Harsimar Kaur (from Dev Box) <[email protected]> * Initial changes --------- Co-authored-by: Azure SDK Bot <[email protected]> Co-authored-by: Anu Thomas Chandy <[email protected]> Co-authored-by: v-durgeshs <[email protected]> Co-authored-by: Vinothini Dharmaraj <[email protected]> Co-authored-by: James Suplizio <[email protected]> Co-authored-by: Bill Wert <[email protected]> Co-authored-by: williamzhao87 <[email protected]> Co-authored-by: Annie Liang <[email protected]> Co-authored-by: annie-mac <[email protected]> Co-authored-by: Kushagra Thapar <[email protected]> Co-authored-by: minwoolee-msft <[email protected]> Co-authored-by: Min Woo Lee 🧊 <[email protected]> Co-authored-by: Alan Zimmer <[email protected]> Co-authored-by: Liudmila Molkova <[email protected]> Co-authored-by: Jesse Squire <[email protected]> Co-authored-by: Harsimar Kaur <[email protected]> Co-authored-by: vcolin7 <[email protected]> Co-authored-by: Xiaofei Cao <[email protected]> Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Patrick Hallisey <[email protected]> Co-authored-by: Jair Myree <[email protected]> Co-authored-by: Weidong Xu <[email protected]> Co-authored-by: Muyao Feng <[email protected]> Co-authored-by: Helen <[email protected]> Co-authored-by: Harsimar Kaur (from Dev Box) <[email protected]> * Resolving comments * Resolving comments * [Cosmos][VectorSearch] Non Streaming Order By Query (#40115) * Initial changes * Initial changes * Increment versions for core releases (#40003) Increment package versions for core releases * Ensure ServiceBus session idle timeout fall back to retry-options::try-timeout (#39994) * Added Alpha3 Java Media Streaming Events (#40002) * Added Alpha3 Java Media Streaming Events * updating readme to add the media streaming events to remove model --------- Co-authored-by: Vinothini Dharmaraj <[email protected]> * Update version of github-event-processor to 1.0.0-dev.20240502.2 (#40012) Co-authored-by: James Suplizio <[email protected]> * Prepare May 2024 Identity Release (#40006) * Prepare Identity Broker May 2024 Release (#40014) * Increment package versions for identity releases (#40015) * [JobRouter] SDK Review updates (#40011) * SDK Review updates * Update auto-generated models * Add customization * Fix customization * Update package * Update tests * Linting * FixFaultInjectionRuleFailedToApplyPerPartitionInGatewayMode (#40005) * fix fault injection rule failed to apply per partition in gateway mode --------- Co-authored-by: annie-mac <[email protected]> * azure-cosmos-test_1.0.0.beta.7Release (#40021) * release azure-cosmos-test 1.0.0.beta.7 --------- Co-authored-by: annie-mac <[email protected]> * Fixed existsById API in ReactiveCosmosTemplate (#40022) * Fixed existsById API in ReactiveCosmosTemplate * Added changelog * Initial changes * Initial changes * Skip Recorded test and delete Event record until test proxy to work with Event recordings (#40029) Co-authored-by: Min Woo Lee 🧊 <[email protected]> * Fix invalid CODEOWNERS (#40032) * Initial changes * ServiceBus: fix session tracing (#39962) * remove additional matrix * Fix session processing and disposition instrumentation * return matrix config * review suggestions * [Automation] Generate SDK based on TypeSpec 0.15.15 (#40048) * [CODEOWNERS] Updates for org changes (#40049) * [CODEOWNERS] Updates for org changes The focus of these changes is to remove an individual who no longer is responsible for the products which their GH account is associated to. * Move from using the docker image to java2docfx for docs validation (#39744) * Move from using the docker image to java2docfx for docs validation * Temporarily turn on docs processing for template libraries for testing * Actually install the rex validation tool * Fix the if not Test-Path statement * Update java2docfx version and add a couple of diagnostics output lines * Add missing close paren * Ensure that Sort-Object always returns an array even if there's only one item * add another piece of diagnostics output * trying one more thing * remove some diag, add other * Remove the additional diagnostics, add permanent output message * Invoke java -jar on java2docfx to show the help command to ensure the install is okay * fiddling with the java -jar command * Set the working directory to the java2docfx directory before executing the mvn dependency download * Actually create the directory before trying to set location...oops * Update rex validation to verify MAVEN_HOME is set * Updates for Java PR 39875 which had changes from this PR that were more immediate * Update java2docfx version * remove check for MAVEN_HOME which was only for testing * Update the version of java2docfx to test a fix * Update version of java2docfx to 1.0.4 * revert template's ci.yml changes that were only necessary to test java2docfx * owners (#39686) * Use ClientLogger in testing output (#40010) Use ClientLogger in testing output * Fix null pointer exception and context usage (#40053) * Rename AML to AzureMachineLearning (#40056) * Fixed the Key Vault `test-resources.json` file to properly configure a deployment script for certificate creation. (#40037) * Close response body in bearer policy (#40052) * Running Prepare-Release for azure-messaging-servicebus 7.17.0 (#40058) * mgmt, TypeSpec code generation pipeline (#39963) * typespec generation pipeline echo command PR_TITLE * generation typespec Update generation.yml for Azure Pipelines Update generation.yml for Azure Pipelines Update generation.yml for Azure Pipelines * remove typespec pipeline file * fix pr title * address comments * Add codeowner linter owners (#39997) * Update to ESRP task version that supports federated auth (#40059) * Increment package versions for cosmos releases (#40031) * Update azure-sdk-build-tools Repository Resource Refs in Yaml files (#39627) * Add reduced embeddings sample to azure-search-documents (#40069) * Add reduced embeddings sample * Fix cspell * Fix link * Search May Preview Regen Updates (#40057) * Search May Preview Regeneration - Still need to add varargs convenience * Removing ovveride statements from `setFields` for `VectorizableImageUrlQuery` and `VectorizableImageBinaryQuery` * Removing ovveride statements from `setFields` for `VectorizableImageUrlQuery` and `VectorizableImageBinaryQuery` * adding varargs * Additional adjustments to FieldBuilder and Search Index Customizations * Updating cspell.json * Adjust `SearchScoreThreshold` customization Re-enable code generation in CI * Updates: - Updated Cspell - Rename `maxStoragePerIndex` property to `maxStoragePerIndexInBytes` in SearchServiceLimits - Set `hybridSearch` property to be type `HybridSearch` in SearchRequest - Add `hybridSearch` to SearchOptions and `SearchAsyncClient.createSearchRequest()` * Adding Support and testing byte[] and List<byte> within field builder * Fix linting --------- Co-authored-by: alzimmermsft <[email protected]> * Preparing Search May 2024 Beta Release (#40071) * Preparing Search May 2024 Beta Release * Preparing Search May 2024 Beta Release * Resolving comments * Fixing build issues * eng, update autorest.java, improve error output in sdk automation (#40073) * improve error output * autorest.java 4.1.29 * Merge to main after spring cloud azure 4.18.0 released (#40075) * Prepare for Spring Cloud Azure 4.18.0 release (#40063) * update version client * update version/changelog/readme * update changelog * Increment versions for spring releases (#40074) * Increment package versions for spring releases * Update version_client.txt * Update pom.xml --------- Co-authored-by: Muyao Feng <[email protected]> --------- Co-authored-by: Azure SDK Bot <[email protected]> * Miscellaneous Core performance improvements (#39552) Miscellaneous Core performance improvements * Increment package versions for search releases (#40072) * Update io.fabric8:kubernetes-client (#40086) 5.12.3 -> 6.12.1 * Increment package versions for servicebus releases (#40094) * Emit stable auto-instrumented otel metrics (#39960) * Update otel metrics logic * add runtime metrics * adding a few metrics I forgot * small correction * Update * Fix * Update * Delete pre-stable metrics --------- Co-authored-by: Harsimar Kaur (from Dev Box) <[email protected]> * [Key Vault] Added support for `/prerestore` and `/prebackup` endpoints in Backup clients (#39878) * Updated `autorest.md` files in all swagger folders. * Re-generated implementation code. * Updated ServiceVersion expandable enums. * Added public APIs for the new /prebacukp and /prerestore endpoints. * Added tests. * Refactored Backup client tests. * Updated tests. * Updated test recordings. * Updated documentation and samples. * Addressed PR feedback. * Initial changes * Prepare to release beta.22 (#40097) * Fix template name (#40099) * Fix template name * Also install the rex validation tool * Update partner release to use WIF (#40101) * core mgmt, `SubResource` implements `JsonSerializable` to support azure-json (#40076) * test * implementation * fix lint * spotless:apply * Update spring-reference and sync changelog (#40105) * update spring-reference.yml * update CHANGELOG.md * Support per-call response timeout in all HttpClient implementations (#40017) Support per-call response timeout in all HttpClient implementations * Change how JavaType is resolved to support JsonSerializable better (#40112) * Initial changes * Fixes --------- Co-authored-by: Azure SDK Bot <[email protected]> Co-authored-by: Anu Thomas Chandy <[email protected]> Co-authored-by: v-durgeshs <[email protected]> Co-authored-by: Vinothini Dharmaraj <[email protected]> Co-authored-by: James Suplizio <[email protected]> Co-authored-by: Bill Wert <[email protected]> Co-authored-by: williamzhao87 <[email protected]> Co-authored-by: Annie Liang <[email protected]> Co-authored-by: annie-mac <[email protected]> Co-authored-by: Kushagra Thapar <[email protected]> Co-authored-by: minwoolee-msft <[email protected]> Co-authored-by: Min Woo Lee 🧊 <[email protected]> Co-authored-by: Alan Zimmer <[email protected]> Co-authored-by: Liudmila Molkova <[email protected]> Co-authored-by: Jesse Squire <[email protected]> Co-authored-by: Harsimar Kaur <[email protected]> Co-authored-by: vcolin7 <[email protected]> Co-authored-by: Xiaofei Cao <[email protected]> Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Patrick Hallisey <[email protected]> Co-authored-by: Jair Myree <[email protected]> Co-authored-by: Weidong Xu <[email protected]> Co-authored-by: Muyao Feng <[email protected]> Co-authored-by: Helen <[email protected]> Co-authored-by: Harsimar Kaur (from Dev Box) <[email protected]> * Fixing merge issues * Fixing merge issues * Fixing build * Fixing build --------- Co-authored-by: Azure SDK Bot <[email protected]> Co-authored-by: Anu Thomas Chandy <[email protected]> Co-authored-by: v-durgeshs <[email protected]> Co-authored-by: Vinothini Dharmaraj <[email protected]> Co-authored-by: James Suplizio <[email protected]> Co-authored-by: Bill Wert <[email protected]> Co-authored-by: williamzhao87 <[email protected]> Co-authored-by: Annie Liang <[email protected]> Co-authored-by: annie-mac <[email protected]> Co-authored-by: Kushagra Thapar <[email protected]> Co-authored-by: minwoolee-msft <[email protected]> Co-authored-by: Min Woo Lee 🧊 <[email protected]> Co-authored-by: Alan Zimmer <[email protected]> Co-authored-by: Liudmila Molkova <[email protected]> Co-authored-by: Jesse Squire <[email protected]> Co-authored-by: Harsimar Kaur <[email protected]> Co-authored-by: vcolin7 <[email protected]> Co-authored-by: Xiaofei Cao <[email protected]> Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Patrick Hallisey <[email protected]> Co-authored-by: Jair Myree <[email protected]> Co-authored-by: Weidong Xu <[email protected]> Co-authored-by: Muyao Feng <[email protected]> Co-authored-by: Helen <[email protected]> Co-authored-by: Harsimar Kaur (from Dev Box) <[email protected]>
1 parent 473c5a5 commit 3638228

File tree

14 files changed

+877
-10
lines changed

14 files changed

+877
-10
lines changed

sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/VectorIndexTest.java

Lines changed: 345 additions & 0 deletions
Large diffs are not rendered by default.

sdk/cosmos/azure-cosmos/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### 4.60.0-beta.1 (Unreleased)
44

55
#### Features Added
6+
* Added `cosmosVectorEmbeddingPolicy` in `cosmosContainerProperties` and `vectorIndexes` in `indexPolicy` to support vector search in CosmosDB - See[39379](https://github.com/Azure/azure-sdk-for-java/pull/39379)
67
* Added the capability to regionally scope session tokens used for operations scoped to a logical partition. - See [PR 38003](https://github.com/Azure/azure-sdk-for-java/pull/38003)
78

89
#### Breaking Changes
@@ -14,10 +15,9 @@
1415
* Added change to throw `IllegalStateException` when change feed mode is switched from `AllVersionsAndDeletes` to `Incremental` and vice-versa for the same deployment unit for EPK-Range based leases. See [PR 38740](https://github.com/Azure/azure-sdk-for-java/pull/38740)
1516

1617
### 4.59.0 (2024-04-27)
17-
1818
#### Features Added
1919
* Added public APIs `getCustomItemSerializer` and `setCustomItemSerializer` to allow customers to specify custom payload transformations or serialization settings. - See [PR 38997](https://github.com/Azure/azure-sdk-for-java/pull/38997) and [PR 39933](https://github.com/Azure/azure-sdk-for-java/pull/39933)
20-
20+
2121
#### Other Changes
2222
* Load Blackbird or Afterburner into the ObjectMapper depending upon Java version and presence of modules in classpath. Make Afterburner and Blackbird optional maven dependencies. See - [PR 39689](https://github.com/Azure/azure-sdk-for-java/pull/39689)
2323

sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Constants.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ public static final class Properties {
120120
public static final String SPATIAL_INDEXES = "spatialIndexes";
121121
public static final String TYPES = "types";
122122

123+
// Vector Embedding Policy
124+
public static final String VECTOR_EMBEDDING_POLICY = "vectorEmbeddingPolicy";
125+
public static final String VECTOR_INDEXES = "vectorIndexes";
126+
public static final String VECTOR_EMBEDDINGS = "vectorEmbeddings";
127+
public static final String VECTOR_INDEX_TYPE = "type";
128+
public static final String VECTOR_DATA_TYPE = "dataType";
129+
public static final String VECTOR_DIMENSIONS = "dimensions";
130+
public static final String DISTANCE_FUNCTION = "distanceFunction";
131+
123132
// Unique index.
124133
public static final String UNIQUE_KEY_POLICY = "uniqueKeyPolicy";
125134
public static final String UNIQUE_KEYS = "uniqueKeys";

sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/DocumentCollection.java

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
import com.azure.cosmos.CosmosItemSerializer;
77
import com.azure.cosmos.implementation.apachecommons.lang.StringUtils;
88
import com.azure.cosmos.implementation.caches.SerializableWrapper;
9-
import com.azure.cosmos.models.ClientEncryptionPolicy;
109
import com.azure.cosmos.models.ChangeFeedPolicy;
10+
import com.azure.cosmos.models.ClientEncryptionPolicy;
1111
import com.azure.cosmos.models.ComputedProperty;
1212
import com.azure.cosmos.models.ConflictResolutionPolicy;
13+
import com.azure.cosmos.models.CosmosVectorEmbeddingPolicy;
1314
import com.azure.cosmos.models.IndexingPolicy;
1415
import com.azure.cosmos.models.ModelBridgeInternal;
1516
import com.azure.cosmos.models.PartitionKeyDefinition;
@@ -24,6 +25,8 @@
2425
import java.util.Collection;
2526
import java.util.Collections;
2627

28+
import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull;
29+
2730
/**
2831
* Represents a document collection in the Azure Cosmos DB database service. A collection is a named logical container
2932
* for documents.
@@ -40,6 +43,7 @@ public final class DocumentCollection extends Resource {
4043
private UniqueKeyPolicy uniqueKeyPolicy;
4144
private PartitionKeyDefinition partitionKeyDefinition;
4245
private ClientEncryptionPolicy clientEncryptionPolicyInternal;
46+
private CosmosVectorEmbeddingPolicy cosmosVectorEmbeddingPolicy;
4347

4448
/**
4549
* Constructor.
@@ -410,6 +414,33 @@ public void setClientEncryptionPolicy(ClientEncryptionPolicy value) {
410414
this.set(Constants.Properties.CLIENT_ENCRYPTION_POLICY, value, CosmosItemSerializer.DEFAULT_SERIALIZER);
411415
}
412416

417+
/**
418+
* Gets the Vector Embedding Policy containing paths for embeddings along with path-specific settings for the item
419+
* used in performing vector search on the items in a collection in the Azure CosmosDB database service.
420+
*
421+
* @return the Vector Embedding Policy.
422+
*/
423+
public CosmosVectorEmbeddingPolicy getVectorEmbeddingPolicy() {
424+
if (this.cosmosVectorEmbeddingPolicy == null) {
425+
if (super.has(Constants.Properties.VECTOR_EMBEDDING_POLICY)) {
426+
this.cosmosVectorEmbeddingPolicy = super.getObject(Constants.Properties.VECTOR_EMBEDDING_POLICY,
427+
CosmosVectorEmbeddingPolicy.class);
428+
}
429+
}
430+
return this.cosmosVectorEmbeddingPolicy;
431+
}
432+
433+
/**
434+
* Sets the Vector Embedding Policy containing paths for embeddings along with path-specific settings for the item
435+
* used in performing vector search on the items in a collection in the Azure CosmosDB database service.
436+
*
437+
* @param value the Vector Embedding Policy.
438+
*/
439+
public void setVectorEmbeddingPolicy(CosmosVectorEmbeddingPolicy value) {
440+
checkNotNull(value, "cosmosVectorEmbeddingPolicy cannot be null");
441+
this.set(Constants.Properties.VECTOR_EMBEDDING_POLICY, value, CosmosItemSerializer.DEFAULT_SERIALIZER);
442+
}
443+
413444
public void populatePropertyBag() {
414445
super.populatePropertyBag();
415446
if (this.indexingPolicy == null) {

sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CompositePath.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public CompositePathSortOrder getOrder() {
9393
}
9494

9595
/**
96-
* Gets the sort order for the composite path.
96+
* Sets the sort order for the composite path.
9797
* <p>
9898
* For example if you want to run the query "SELECT * FROM c ORDER BY c.age asc, c.height desc",
9999
* then you need to make the order for "/age" "ascending" and the order for "/height" "descending".

sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosContainerProperties.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,28 @@ public CosmosContainerProperties setClientEncryptionPolicy(ClientEncryptionPolic
347347
return this;
348348
}
349349

350+
/**
351+
* Gets the Vector Embedding Policy containing paths for embeddings along with path-specific settings for the item
352+
* used in performing vector search on the items in a collection in the Azure CosmosDB database service.
353+
*
354+
* @return the Vector Embedding Policy.
355+
*/
356+
public CosmosVectorEmbeddingPolicy getVectorEmbeddingPolicy() {
357+
return this.documentCollection.getVectorEmbeddingPolicy();
358+
}
359+
360+
/**
361+
* Sets the Vector Embedding Policy containing paths for embeddings along with path-specific settings for the item
362+
* used in performing vector search on the items in a collection in the Azure CosmosDB database service.
363+
*
364+
* @param value the Vector Embedding Policy.
365+
* @return the CosmosContainerProperties.
366+
*/
367+
public CosmosContainerProperties setVectorEmbeddingPolicy(CosmosVectorEmbeddingPolicy value) {
368+
this.documentCollection.setVectorEmbeddingPolicy(value);
369+
return this;
370+
}
371+
350372
Resource getResource() {
351373
return this.documentCollection;
352374
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
package com.azure.cosmos.models;
5+
6+
import com.fasterxml.jackson.annotation.JsonValue;
7+
8+
import java.util.Arrays;
9+
10+
/**
11+
* Data types for the embeddings in Cosmos DB database service.
12+
*/
13+
public enum CosmosVectorDataType {
14+
/**
15+
* Represents a int8 data type.
16+
*/
17+
INT8("int8"),
18+
19+
/**
20+
* Represents a uint8 data type.
21+
*/
22+
UINT8("uint8"),
23+
24+
/**
25+
* Represents a float16 data type.
26+
*/
27+
FLOAT16("float16"),
28+
29+
/**
30+
* Represents a float32 data type.
31+
*/
32+
FLOAT32("float32");
33+
34+
private final String overWireValue;
35+
36+
CosmosVectorDataType(String overWireValue) {
37+
this.overWireValue = overWireValue;
38+
}
39+
40+
@JsonValue
41+
@Override
42+
public String toString() {
43+
return this.overWireValue;
44+
}
45+
46+
/**
47+
* Method to retrieve the enum constant by its overWireValue.
48+
* @param value the overWire value of the enum constant
49+
* @return the matching CosmosVectorDataType
50+
* @throws IllegalArgumentException if no matching enum constant is found
51+
*/
52+
public static CosmosVectorDataType fromString(String value) {
53+
return Arrays.stream(CosmosVectorDataType.values())
54+
.filter(vectorDataType -> vectorDataType.toString().equalsIgnoreCase(value))
55+
.findFirst()
56+
.orElseThrow(() -> new IllegalArgumentException(String.format(
57+
"Invalid vector data type with value {%s} for the vector embedding policy.", value)));
58+
}
59+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
package com.azure.cosmos.models;
5+
6+
import com.fasterxml.jackson.annotation.JsonValue;
7+
8+
import java.util.Arrays;
9+
10+
/**
11+
* Distance Function for the embeddings in the Cosmos DB database service.
12+
*/
13+
public enum CosmosVectorDistanceFunction {
14+
/**
15+
* Represents the euclidean distance function.
16+
*/
17+
EUCLIDEAN("euclidean"),
18+
19+
/**
20+
* Represents the cosine distance function.
21+
*/
22+
COSINE("cosine"),
23+
24+
/**
25+
* Represents the dot product distance function.
26+
*/
27+
DOT_PRODUCT("dotproduct");
28+
29+
private final String overWireValue;
30+
31+
CosmosVectorDistanceFunction(String overWireValue) {
32+
this.overWireValue = overWireValue;
33+
}
34+
35+
@JsonValue
36+
@Override
37+
public String toString() {
38+
return this.overWireValue;
39+
}
40+
41+
/**
42+
* Method to retrieve the enum constant by its overWireValue.
43+
* @param value the overWire value of the enum constant
44+
* @return the matching CosmosVectorDataType
45+
* @throws IllegalArgumentException if no matching enum constant is found
46+
*/
47+
public static CosmosVectorDistanceFunction fromString(String value) {
48+
return Arrays.stream(CosmosVectorDistanceFunction.values())
49+
.filter(vectorDistanceFunction -> vectorDistanceFunction.toString().equalsIgnoreCase(value))
50+
.findFirst()
51+
.orElseThrow(() -> new IllegalArgumentException(String.format(
52+
"Invalid distance function with value {%s} for the vector embedding policy.", value )));
53+
}
54+
}
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
package com.azure.cosmos.models;
5+
6+
import com.azure.cosmos.implementation.Constants;
7+
import com.azure.cosmos.implementation.JsonSerializable;
8+
import com.azure.cosmos.implementation.apachecommons.lang.StringUtils;
9+
import com.fasterxml.jackson.annotation.JsonProperty;
10+
import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull;
11+
12+
/**
13+
* Embedding settings within {@link CosmosVectorEmbeddingPolicy}
14+
*/
15+
public final class CosmosVectorEmbedding {
16+
@JsonProperty(Constants.Properties.PATH)
17+
private String path;
18+
@JsonProperty(Constants.Properties.VECTOR_DATA_TYPE)
19+
private String dataType;
20+
@JsonProperty(Constants.Properties.VECTOR_DIMENSIONS)
21+
private Long dimensions;
22+
@JsonProperty(Constants.Properties.DISTANCE_FUNCTION)
23+
private String distanceFunction;
24+
private JsonSerializable jsonSerializable;
25+
26+
/**
27+
* Constructor
28+
*/
29+
public CosmosVectorEmbedding() {
30+
this.jsonSerializable = new JsonSerializable();
31+
}
32+
33+
/**
34+
* Gets the path for the cosmosVectorEmbedding.
35+
*
36+
* @return path
37+
*/
38+
public String getPath() {
39+
return path;
40+
}
41+
42+
/**
43+
* Sets the path for the cosmosVectorEmbedding.
44+
*
45+
* @param path the path for the cosmosVectorEmbedding
46+
* @return CosmosVectorEmbedding
47+
*/
48+
public CosmosVectorEmbedding setPath(String path) {
49+
if (StringUtils.isEmpty(path)) {
50+
throw new NullPointerException("embedding path is either null or empty");
51+
}
52+
53+
if (path.charAt(0) != '/' || path.lastIndexOf('/') != 0) {
54+
throw new IllegalArgumentException("");
55+
}
56+
57+
this.path = path;
58+
return this;
59+
}
60+
61+
/**
62+
* Gets the data type for the cosmosVectorEmbedding.
63+
*
64+
* @return dataType
65+
*/
66+
public CosmosVectorDataType getDataType() {
67+
return CosmosVectorDataType.fromString(dataType);
68+
}
69+
70+
/**
71+
* Sets the data type for the cosmosVectorEmbedding.
72+
*
73+
* @param dataType the data type for the cosmosVectorEmbedding
74+
* @return CosmosVectorEmbedding
75+
*/
76+
public CosmosVectorEmbedding setDataType(CosmosVectorDataType dataType) {
77+
checkNotNull(dataType, "cosmosVectorDataType cannot be null");
78+
this.dataType = dataType.toString();
79+
return this;
80+
}
81+
82+
/**
83+
* Gets the dimensions for the cosmosVectorEmbedding.
84+
*
85+
* @return dimensions
86+
*/
87+
public Long getDimensions() {
88+
return dimensions;
89+
}
90+
91+
/**
92+
* Sets the dimensions for the cosmosVectorEmbedding.
93+
*
94+
* @param dimensions the dimensions for the cosmosVectorEmbedding
95+
* @return CosmosVectorEmbedding
96+
*/
97+
public CosmosVectorEmbedding setDimensions(Long dimensions) {
98+
checkNotNull(dimensions, "dimensions cannot be null");
99+
if (dimensions < 1) {
100+
throw new IllegalArgumentException("Dimensions for the embedding has to be a long value greater than 0 " +
101+
"for the vector embedding policy");
102+
}
103+
104+
this.dimensions = dimensions;
105+
return this;
106+
}
107+
108+
/**
109+
* Gets the distanceFunction for the cosmosVectorEmbedding.
110+
*
111+
* @return distanceFunction
112+
*/
113+
public CosmosVectorDistanceFunction getDistanceFunction() {
114+
return CosmosVectorDistanceFunction.fromString(distanceFunction);
115+
}
116+
117+
/**
118+
* Sets the distanceFunction for the cosmosVectorEmbedding.
119+
*
120+
* @param distanceFunction the distanceFunction for the cosmosVectorEmbedding
121+
* @return CosmosVectorEmbedding
122+
*/
123+
public CosmosVectorEmbedding setDistanceFunction(CosmosVectorDistanceFunction distanceFunction) {
124+
checkNotNull(distanceFunction, "cosmosVectorDistanceFunction cannot be null");
125+
this.distanceFunction = distanceFunction.toString();
126+
return this;
127+
}
128+
}

0 commit comments

Comments
 (0)