Skip to content

Commit 1a4e3c0

Browse files
authored
Merge pull request #64 from pinecone-io/sc-15047/refine-metadata-config-structure
rename metadata_index_config to metadata_config
2 parents e8d1fef + 0edf2bf commit 1a4e3c0

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

pinecone/core/client/model/create_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def openapi_types():
9595
'shards': (int,), # noqa: E501
9696
'pod_type': (str,), # noqa: E501
9797
'index_config': (dict,), # noqa: E501
98-
'metadata_index_config': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501
98+
'metadata_config': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501
9999
}
100100

101101
@cached_property
@@ -113,7 +113,7 @@ def discriminator():
113113
'shards': 'shards', # noqa: E501
114114
'pod_type': 'pod_type', # noqa: E501
115115
'index_config': 'index_config', # noqa: E501
116-
'metadata_index_config': 'metadata_index_config', # noqa: E501
116+
'metadata_config': 'metadata_config', # noqa: E501
117117
}
118118

119119
read_only_vars = {
@@ -168,7 +168,7 @@ def _from_openapi_data(cls, name, dimension, *args, **kwargs): # noqa: E501
168168
shards (int): The number of shards to be used in the index.. [optional] if omitted the server will use the default value of 1 # noqa: E501
169169
pod_type (str): The type of pod to use. One of 's1' or 'p1'.. [optional] if omitted the server will use the default value of "p1" # noqa: E501
170170
index_config (dict): [optional] # noqa: E501
171-
metadata_index_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Configuration for the behavior of Pinecone's internal metadata index. [optional] # noqa: E501
171+
metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Configuration for the behavior of Pinecone's internal metadata index. [optional] # noqa: E501
172172
"""
173173

174174
_check_type = kwargs.pop('_check_type', True)
@@ -263,7 +263,7 @@ def __init__(self, name, dimension, *args, **kwargs): # noqa: E501
263263
shards (int): The number of shards to be used in the index.. [optional] if omitted the server will use the default value of 1 # noqa: E501
264264
pod_type (str): The type of pod to use. One of 's1' or 'p1'.. [optional] if omitted the server will use the default value of "p1" # noqa: E501
265265
index_config (dict): [optional] # noqa: E501
266-
metadata_index_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Configuration for the behavior of Pinecone's internal metadata index. [optional] # noqa: E501
266+
metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): Configuration for the behavior of Pinecone's internal metadata index. [optional] # noqa: E501
267267
"""
268268

269269
_check_type = kwargs.pop('_check_type', True)

pinecone/manage.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class IndexDescription(NamedTuple):
3030
pod_type: str
3131
index_config: None
3232
status: None
33-
metadata_index_config: None
33+
metadata_config: None
3434

3535

3636
def _get_api_instance():
@@ -66,7 +66,7 @@ def create_index(
6666
pods: int = 1,
6767
pod_type: str = 'p1',
6868
index_config: dict = None,
69-
metadata_index_config: dict = None
69+
metadata_config: dict = None
7070
):
7171
"""Creates a Pinecone index.
7272
@@ -95,8 +95,8 @@ def create_index(
9595
:param pod_type: the pod type to be used for the index. can be one of p1 or s1.
9696
:type pod_type: str,optional
9797
:param index_config: Advanced configuration options for the index
98-
:param metadata_index_config: Configuration related to the metadata index
99-
:type metadata_index_config: dict, optional
98+
:param metadata_config: Configuration related to the metadata index
99+
:type metadata_config: dict, optional
100100
:type timeout: int, optional
101101
:param timeout: Timeout for wait until index gets ready. If None, wait indefinitely; if >=0, time out after this many seconds; if -1, return immediately and do not wait. Default: None
102102
"""
@@ -112,7 +112,7 @@ def create_index(
112112
pods=pods,
113113
pod_type=pod_type,
114114
index_config=index_config or {},
115-
metadata_index_config=metadata_index_config
115+
metadata_config=metadata_config
116116
))
117117

118118
def is_ready():
@@ -186,7 +186,7 @@ def describe_index(name: str):
186186
return IndexDescription(name=db['name'], index_type=db['index_type'], metric=db['metric'],
187187
replicas=db['replicas'], dimension=db['dimension'], shards=db['shards'],
188188
pods=db.get('pods', db['shards']*db['replicas']), pod_type=db.get('pod_type', 'p1'),
189-
index_config=db['index_config'], status={'ready': ready, 'state': state}, metadata_index_config=db.get('metadata_index_config'))
189+
index_config=db['index_config'], status={'ready': ready, 'state': state}, metadata_config=db.get('metadata_config'))
190190

191191

192192
def scale_index(name: str, replicas: int):

specs/index_service.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
}
279279
]
280280
},
281-
"metadata_index_config": {
281+
"metadata_config": {
282282
"type": "object",
283283
"description": "Configuration for the behavior of Pinecone's internal metadata index",
284284
"nullable": true

specs/pinecone_api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@
11521152
}
11531153
]
11541154
},
1155-
"metadata_index_config": {
1155+
"metadata_config": {
11561156
"type": "object",
11571157
"description": "Configuration for the behavior of Pinecone's internal metadata index",
11581158
"nullable": true

0 commit comments

Comments
 (0)