Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions sdk/cosmos/azure-cosmos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -816,11 +816,6 @@ Or if you'd like to add the optional parameters to the vector distance, you coul
The `embeddings_string` above would be your string made from your vector embeddings.
You can find our sync samples [here][cosmos_index_sample] and our async samples [here][cosmos_index_sample_async] as well to help yourself out.

*Note: For a limited time, if your query operates against a region or emulator that has not yet been updated the client might run into some issues
not being able to recognize the new NonStreamingOrderBy capability that makes vector search possible.
If this happens, you can set the `AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY` environment variable to `"True"` to opt out of this
functionality and continue operating as usual.*

### Public Preview - Full Text Policy and Full Text Indexes
We have added new capabilities to utilize full text policies and full text indexing for users to leverage full text search
utilizing our Cosmos SDK. These two container-level configurations have to be turned on at the account-level
Expand Down
2 changes: 0 additions & 2 deletions sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ class _Constants:
EnableMultipleWritableLocations: Literal["enableMultipleWriteLocations"] = "enableMultipleWriteLocations"

# Environment variables
NON_STREAMING_ORDER_BY_DISABLED_CONFIG: str = "AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"
NON_STREAMING_ORDER_BY_DISABLED_CONFIG_DEFAULT: str = "False"
HS_MAX_ITEMS_CONFIG: str = "AZURE_COSMOS_HYBRID_SEARCH_MAX_ITEMS"
HS_MAX_ITEMS_CONFIG_DEFAULT: int = 1000
MAX_ITEM_BUFFER_VS_CONFIG: str = "AZURE_COSMOS_MAX_ITEM_BUFFER_VECTOR_SEARCH"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3390,15 +3390,6 @@ def _GetQueryPlanThroughGateway(self, query: str, resource_link: str,
documents._QueryFeature.HybridSearch + "," +
documents._QueryFeature.CountIf + "," +
documents._QueryFeature.WeightedRankFusion)
if os.environ.get(Constants.NON_STREAMING_ORDER_BY_DISABLED_CONFIG,
Constants.NON_STREAMING_ORDER_BY_DISABLED_CONFIG_DEFAULT) == "True":
supported_query_features = (documents._QueryFeature.Aggregate + "," +
documents._QueryFeature.CompositeAggregate + "," +
documents._QueryFeature.Distinct + "," +
documents._QueryFeature.MultipleOrderBy + "," +
documents._QueryFeature.OffsetAndLimit + "," +
documents._QueryFeature.OrderBy + "," +
documents._QueryFeature.Top)

options = {
"contentType": runtime_constants.MediaTypes.Json,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3409,15 +3409,6 @@ async def _GetQueryPlanThroughGateway(self, query: str, resource_link: str,
documents._QueryFeature.HybridSearch + "," +
documents._QueryFeature.CountIf + "," +
documents._QueryFeature.WeightedRankFusion)
if os.environ.get(Constants.NON_STREAMING_ORDER_BY_DISABLED_CONFIG,
Constants.NON_STREAMING_ORDER_BY_DISABLED_CONFIG_DEFAULT) == "True":
supported_query_features = (documents._QueryFeature.Aggregate + "," +
documents._QueryFeature.CompositeAggregate + "," +
documents._QueryFeature.Distinct + "," +
documents._QueryFeature.MultipleOrderBy + "," +
documents._QueryFeature.OffsetAndLimit + "," +
documents._QueryFeature.OrderBy + "," +
documents._QueryFeature.Top)

options = {
"contentType": runtime_constants.MediaTypes.Json,
Expand Down
2 changes: 0 additions & 2 deletions sdk/cosmos/azure-cosmos/tests/test_aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ def _setup(cls):
cls.client = cosmos_client.CosmosClient(_config.host, _config.master_key)
cls.created_db = cls.client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID)
cls.created_collection = cls._create_collection(cls.created_db)
if _config.host == "https://localhost:8081/":
os.environ["AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"] = "True"

# test documents
document_definitions = []
Expand Down
2 changes: 0 additions & 2 deletions sdk/cosmos/azure-cosmos/tests/test_multi_orderby.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class TestMultiOrderBy(unittest.TestCase):
def setUpClass(cls):
cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey)
cls.database = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID)
if cls.host == "https://localhost:8081/":
os.environ["AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"] = "True"

def generate_multi_orderby_item(self):
item = {'id': str(uuid.uuid4()), self.NUMBER_FIELD: random.randint(0, 5),
Expand Down
2 changes: 0 additions & 2 deletions sdk/cosmos/azure-cosmos/tests/test_partition_split_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ def setUpClass(cls):
id=cls.TEST_CONTAINER_ID,
partition_key=PartitionKey(path="/id"),
offer_throughput=cls.throughput)
if cls.host == "https://localhost:8081/":
os.environ["AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"] = "True"

@classmethod
def tearDownClass(cls) -> None:
Expand Down
2 changes: 0 additions & 2 deletions sdk/cosmos/azure-cosmos/tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def setUpClass(cls):
use_multiple_write_locations = True
cls.client = cosmos_client.CosmosClient(cls.host, cls.credential, multiple_write_locations=use_multiple_write_locations)
cls.created_db = cls.client.get_database_client(cls.TEST_DATABASE_ID)
if cls.host == "https://localhost:8081/":
os.environ["AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"] = "True"

def test_first_and_last_slashes_trimmed_for_query_string(self):
created_collection = self.created_db.create_container(
Expand Down
2 changes: 0 additions & 2 deletions sdk/cosmos/azure-cosmos/tests/test_query_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ async def asyncSetUp(self):
self.client = CosmosClient(self.host, self.masterKey, multiple_write_locations=self.use_multiple_write_locations)
await self.client.__aenter__()
self.created_db = self.client.get_database_client(self.TEST_DATABASE_ID)
if self.host == "https://localhost:8081/":
os.environ["AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"] = "True"

async def asyncTearDown(self):
await self.client.close()
Expand Down
2 changes: 0 additions & 2 deletions sdk/cosmos/azure-cosmos/tests/test_query_cross_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def setUpClass(cls):
use_multiple_write_locations = True
cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey, multiple_write_locations=use_multiple_write_locations)
cls.created_db = cls.client.get_database_client(cls.TEST_DATABASE_ID)
if cls.host == "https://localhost:8081/":
os.environ["AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"] = "True"

def setUp(self):
self.created_container = self.created_db.create_container(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ async def asyncSetUp(self):
self.TEST_CONTAINER_ID,
PartitionKey(path="/pk"),
offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS)
if self.host == "https://localhost:8081/":
os.environ["AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"] = "True"

async def asyncTearDown(self):
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ def test_vector_search_environment_variables(self):
"Please ensure you are using a limit smaller than the max, or change the max.")

os.environ["AZURE_COSMOS_MAX_ITEM_BUFFER_VECTOR_SEARCH"] = "50000"
os.environ["AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"] = "False"
[item for item in self.created_large_container.query_items(query=query, enable_cross_partition_query=True)]

def test_ordering_distances(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ async def test_vector_search_environment_variables_async(self):
"Please ensure you are using a limit smaller than the max, or change the max.")

os.environ["AZURE_COSMOS_MAX_ITEM_BUFFER_VECTOR_SEARCH"] = "50000"

os.environ["AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY"] = "False"
[item async for item in self.created_large_container.query_items(query=query)]

async def test_ordering_distances_async(self):
Expand Down
Loading