@@ -400,6 +400,8 @@ def test_get_property_indexes(
400400 [
401401 (PropertyIndexType .SEARCHABLE , "searchable" ),
402402 ("searchable" , "searchable" ),
403+ (PropertyIndexType .FILTERABLE , "filterable" ),
404+ ("filterable" , "filterable" ),
403405 (PropertyIndexType .RANGE_FILTERS , "rangeFilters" ),
404406 ("rangeFilters" , "rangeFilters" ),
405407 ],
@@ -430,6 +432,8 @@ def test_update_property_index_enum_and_literal_hit_same_route(
430432 [
431433 (PropertyIndexType .SEARCHABLE , "searchable" ),
432434 ("searchable" , "searchable" ),
435+ (PropertyIndexType .FILTERABLE , "filterable" ),
436+ ("filterable" , "filterable" ),
433437 (PropertyIndexType .RANGE_FILTERS , "rangeFilters" ),
434438 ("rangeFilters" , "rangeFilters" ),
435439 ],
@@ -456,6 +460,54 @@ def test_delete_property_index_enum_and_literal_hit_same_route(
456460 weaviate_139_mock .check_assertions ()
457461
458462
463+ @pytest .mark .parametrize (
464+ "index_name" ,
465+ [PropertyIndexType .RANGE_FILTERS , "rangeFilters" ],
466+ )
467+ def test_rebuild_property_index_enum_and_literal_hit_same_route (
468+ weaviate_139_mock : HTTPServer ,
469+ client_139 : weaviate .WeaviateClient ,
470+ index_name : Union [PropertyIndexType , str ],
471+ ) -> None :
472+ """The enum and literal forms of index_name hit the exact same rebuild route."""
473+ weaviate_139_mock .expect_request (
474+ f"{ SCHEMA_PATH } /properties/age/index/rangeFilters/rebuild" ,
475+ method = "POST" ,
476+ json = {},
477+ ).respond_with_json ({"taskId" : TASK_ID , "status" : "STARTED" }, status = 202 )
478+
479+ task = client_139 .collections .use (COLLECTION ).config .rebuild_property_index (
480+ "age" ,
481+ index_name , # type: ignore
482+ )
483+ assert task .status == PropertyIndexTaskStatus .STARTED
484+ weaviate_139_mock .check_assertions ()
485+
486+
487+ @pytest .mark .parametrize (
488+ "index_name" ,
489+ [PropertyIndexType .RANGE_FILTERS , "rangeFilters" ],
490+ )
491+ def test_cancel_property_index_task_enum_and_literal_hit_same_route (
492+ weaviate_139_mock : HTTPServer ,
493+ client_139 : weaviate .WeaviateClient ,
494+ index_name : Union [PropertyIndexType , str ],
495+ ) -> None :
496+ """The enum and literal forms of index_name hit the exact same cancel route."""
497+ weaviate_139_mock .expect_request (
498+ f"{ SCHEMA_PATH } /properties/age/index/rangeFilters/cancel" ,
499+ method = "POST" ,
500+ json = {},
501+ ).respond_with_json ({"taskId" : TASK_ID , "status" : "CANCELLED" }, status = 202 )
502+
503+ task = client_139 .collections .use (COLLECTION ).config .cancel_property_index_task (
504+ "age" ,
505+ index_name , # type: ignore
506+ )
507+ assert task .status == PropertyIndexTaskStatus .CANCELLED
508+ weaviate_139_mock .check_assertions ()
509+
510+
459511def test_get_property_indexes_reference_property (
460512 weaviate_139_mock : HTTPServer , client_139 : weaviate .WeaviateClient
461513) -> None :
0 commit comments