Skip to content

Commit 7318a4d

Browse files
cloudant-sdks-automationricellis
authored andcommitted
feat(generated): update API definition to 1.0.0-dev0.1.32
Generated SDK source code using: - Generator version 3.108.0 - Specification version 1.0.0-dev0.1.32 - Automation (cloudant-sdks) version e4adb30
1 parent 50e94d6 commit 7318a4d

3 files changed

Lines changed: 68 additions & 45 deletions

File tree

ibmcloudant/cloudant_v1.py

Lines changed: 58 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5692,9 +5692,9 @@ def post_index(
56925692
:param IndexDefinition index: Schema for a `json` or `text` query index
56935693
definition. Indexes of type `text` have additional configuration properties
56945694
that do not apply to `json` indexes, these are:
5695-
* `default_analyzer` - the default text analyzer to use * `default_field` -
5696-
whether to index the text in all document fields and what analyzer to use
5697-
for that purpose.
5695+
* `default_analyzer` - the default text analyzer to use
5696+
* `default_field` - whether to index the text in all document fields and
5697+
what analyzer to use for that purpose.
56985698
:param str ddoc: (optional) Specifies the design document name in which the
56995699
index will be created. The design document name is the design document ID
57005700
excluding the `_design/` prefix.
@@ -9645,9 +9645,9 @@ class Analyzer:
96459645

96469646
:param str name: Schema for the name of the Apache Lucene analyzer to use for
96479647
text indexing. The default value varies depending on the analyzer usage:
9648-
* For search indexes the default is `standard` * For query text indexes the
9649-
default is `keyword` * For a query text index default_field the default is
9650-
`standard`.
9648+
* For search indexes the default is `standard`
9649+
* For query text indexes the default is `keyword`
9650+
* For a query text index default_field the default is `standard`.
96519651
:param List[str] stopwords: (optional) Custom stopwords to use with the named
96529652
analyzer.
96539653
"""
@@ -9664,9 +9664,9 @@ def __init__(
96649664
:param str name: Schema for the name of the Apache Lucene analyzer to use
96659665
for text indexing. The default value varies depending on the analyzer
96669666
usage:
9667-
* For search indexes the default is `standard` * For query text indexes the
9668-
default is `keyword` * For a query text index default_field the default is
9669-
`standard`.
9667+
* For search indexes the default is `standard`
9668+
* For query text indexes the default is `keyword`
9669+
* For a query text index default_field the default is `standard`.
96709670
:param List[str] stopwords: (optional) Custom stopwords to use with the
96719671
named analyzer.
96729672
"""
@@ -9721,9 +9721,9 @@ class NameEnum(str, Enum):
97219721
"""
97229722
Schema for the name of the Apache Lucene analyzer to use for text indexing. The
97239723
default value varies depending on the analyzer usage:
9724-
* For search indexes the default is `standard` * For query text indexes the
9725-
default is `keyword` * For a query text index default_field the default is
9726-
`standard`.
9724+
* For search indexes the default is `standard`
9725+
* For query text indexes the default is `keyword`
9726+
* For a query text index default_field the default is `standard`.
97279727
"""
97289728

97299729
CLASSIC = 'classic'
@@ -9773,15 +9773,17 @@ class NameEnum(str, Enum):
97739773

97749774
class AnalyzerConfiguration:
97759775
"""
9776-
Schema for a search analyzer configuration.
9776+
Analyzer configuration for search indexes. The default and fields properties are only
9777+
applicable for the `perfield` analyzer name.
97779778

97789779
:param str name: Schema for the name of the Apache Lucene analyzer to use for
97799780
text indexing. The default value varies depending on the analyzer usage:
9780-
* For search indexes the default is `standard` * For query text indexes the
9781-
default is `keyword` * For a query text index default_field the default is
9782-
`standard`.
9781+
* For search indexes the default is `standard`
9782+
* For query text indexes the default is `keyword`
9783+
* For a query text index default_field the default is `standard`.
97839784
:param List[str] stopwords: (optional) Custom stopwords to use with the named
97849785
analyzer.
9786+
:param Analyzer default: (optional) Schema for a full text search analyzer.
97859787
:param dict fields: (optional) Schema for mapping a field name to a per field
97869788
analyzer.
97879789
"""
@@ -9791,6 +9793,7 @@ def __init__(
97919793
name: str,
97929794
*,
97939795
stopwords: Optional[List[str]] = None,
9796+
default: Optional['Analyzer'] = None,
97949797
fields: Optional[dict] = None,
97959798
) -> None:
97969799
"""
@@ -9799,16 +9802,18 @@ def __init__(
97999802
:param str name: Schema for the name of the Apache Lucene analyzer to use
98009803
for text indexing. The default value varies depending on the analyzer
98019804
usage:
9802-
* For search indexes the default is `standard` * For query text indexes the
9803-
default is `keyword` * For a query text index default_field the default is
9804-
`standard`.
9805+
* For search indexes the default is `standard`
9806+
* For query text indexes the default is `keyword`
9807+
* For a query text index default_field the default is `standard`.
98059808
:param List[str] stopwords: (optional) Custom stopwords to use with the
98069809
named analyzer.
9810+
:param Analyzer default: (optional) Schema for a full text search analyzer.
98079811
:param dict fields: (optional) Schema for mapping a field name to a per
98089812
field analyzer.
98099813
"""
98109814
self.name = name
98119815
self.stopwords = stopwords
9816+
self.default = default
98129817
self.fields = fields
98139818

98149819
@classmethod
@@ -9821,6 +9826,8 @@ def from_dict(cls, _dict: Dict) -> 'AnalyzerConfiguration':
98219826
raise ValueError('Required property \'name\' not present in AnalyzerConfiguration JSON')
98229827
if (stopwords := _dict.get('stopwords')) is not None:
98239828
args['stopwords'] = stopwords
9829+
if (default := _dict.get('default')) is not None:
9830+
args['default'] = Analyzer.from_dict(default)
98249831
if (fields := _dict.get('fields')) is not None:
98259832
args['fields'] = {k: Analyzer.from_dict(v) for k, v in fields.items()}
98269833
return cls(**args)
@@ -9837,6 +9844,11 @@ def to_dict(self) -> Dict:
98379844
_dict['name'] = self.name
98389845
if hasattr(self, 'stopwords') and self.stopwords is not None:
98399846
_dict['stopwords'] = self.stopwords
9847+
if hasattr(self, 'default') and self.default is not None:
9848+
if isinstance(self.default, dict):
9849+
_dict['default'] = self.default
9850+
else:
9851+
_dict['default'] = self.default.to_dict()
98409852
if hasattr(self, 'fields') and self.fields is not None:
98419853
fields_map = {}
98429854
for k, v in self.fields.items():
@@ -9869,9 +9881,9 @@ class NameEnum(str, Enum):
98699881
"""
98709882
Schema for the name of the Apache Lucene analyzer to use for text indexing. The
98719883
default value varies depending on the analyzer usage:
9872-
* For search indexes the default is `standard` * For query text indexes the
9873-
default is `keyword` * For a query text index default_field the default is
9874-
`standard`.
9884+
* For search indexes the default is `standard`
9885+
* For query text indexes the default is `keyword`
9886+
* For a query text index default_field the default is `standard`.
98759887
"""
98769888

98779889
CLASSIC = 'classic'
@@ -14740,8 +14752,9 @@ class IndexDefinition:
1474014752
"""
1474114753
Schema for a `json` or `text` query index definition. Indexes of type `text` have
1474214754
additional configuration properties that do not apply to `json` indexes, these are:
14743-
* `default_analyzer` - the default text analyzer to use * `default_field` - whether to
14744-
index the text in all document fields and what analyzer to use for that purpose.
14755+
* `default_analyzer` - the default text analyzer to use
14756+
* `default_field` - whether to index the text in all document fields and what analyzer
14757+
to use for that purpose.
1474514758

1474614759
:param Analyzer default_analyzer: (optional) Schema for a full text search
1474714760
analyzer.
@@ -14757,9 +14770,10 @@ class IndexDefinition:
1475714770
:param bool index_array_lengths: (optional) Whether to scan every document for
1475814771
arrays and store the length for each array found. Set the index_array_lengths
1475914772
field to false if:
14760-
* You do not need to know the length of an array. * You do not use the `$size`
14761-
operator. * The documents in your database are complex, or not completely under
14762-
your control. As a result, it is difficult to estimate the impact of the extra
14773+
* You do not need to know the length of an array.
14774+
* You do not use the `$size` operator.
14775+
* The documents in your database are complex, or not completely under your
14776+
control. As a result, it is difficult to estimate the impact of the extra
1476314777
processing that is needed to determine and store the arrays lengths.
1476414778
:param dict partial_filter_selector: (optional) JSON object describing criteria
1476514779
used to select documents. The selector specifies fields in the document, and
@@ -14824,11 +14838,11 @@ def __init__(
1482414838
:param bool index_array_lengths: (optional) Whether to scan every document
1482514839
for arrays and store the length for each array found. Set the
1482614840
index_array_lengths field to false if:
14827-
* You do not need to know the length of an array. * You do not use the
14828-
`$size` operator. * The documents in your database are complex, or not
14829-
completely under your control. As a result, it is difficult to estimate the
14830-
impact of the extra processing that is needed to determine and store the
14831-
arrays lengths.
14841+
* You do not need to know the length of an array.
14842+
* You do not use the `$size` operator.
14843+
* The documents in your database are complex, or not completely under your
14844+
control. As a result, it is difficult to estimate the impact of the extra
14845+
processing that is needed to determine and store the arrays lengths.
1483214846
:param dict partial_filter_selector: (optional) JSON object describing
1483314847
criteria used to select documents. The selector specifies fields in the
1483414848
document, and provides an expression to evaluate with the field content or
@@ -15067,9 +15081,9 @@ class IndexInformation:
1506715081
:param IndexDefinition def_: Schema for a `json` or `text` query index
1506815082
definition. Indexes of type `text` have additional configuration properties that
1506915083
do not apply to `json` indexes, these are:
15070-
* `default_analyzer` - the default text analyzer to use * `default_field` -
15071-
whether to index the text in all document fields and what analyzer to use for
15072-
that purpose.
15084+
* `default_analyzer` - the default text analyzer to use
15085+
* `default_field` - whether to index the text in all document fields and what
15086+
analyzer to use for that purpose.
1507315087
:param str name: Index name.
1507415088
:param bool partitioned: (optional) Indicates if index is partitioned.
1507515089
:param str type: Schema for the type of an index.
@@ -15092,9 +15106,9 @@ def __init__(
1509215106
:param IndexDefinition def_: Schema for a `json` or `text` query index
1509315107
definition. Indexes of type `text` have additional configuration properties
1509415108
that do not apply to `json` indexes, these are:
15095-
* `default_analyzer` - the default text analyzer to use * `default_field` -
15096-
whether to index the text in all document fields and what analyzer to use
15097-
for that purpose.
15109+
* `default_analyzer` - the default text analyzer to use
15110+
* `default_field` - whether to index the text in all document fields and
15111+
what analyzer to use for that purpose.
1509815112
:param str name: Index name.
1509915113
:param str type: Schema for the type of an index.
1510015114
:param bool partitioned: (optional) Indicates if index is partitioned.
@@ -17993,8 +18007,9 @@ class SearchIndexDefinition:
1799318007
"""
1799418008
Schema for a search index definition.
1799518009

17996-
:param AnalyzerConfiguration analyzer: (optional) Schema for a search analyzer
17997-
configuration.
18010+
:param AnalyzerConfiguration analyzer: (optional) Analyzer configuration for
18011+
search indexes. The default and fields properties are only applicable for the
18012+
`perfield` analyzer name.
1799818013
:param str index: String form of a JavaScript function that is called for each
1799918014
document in the database. The function takes the document as a parameter,
1800018015
extracts some data from it, and then calls the `index` function to index that
@@ -18047,8 +18062,9 @@ def __init__(
1804718062
* `store` - boolean, default `true` - If true, the value is
1804818063
returned in the search result; otherwise, the value is not
1804918064
returned.
18050-
:param AnalyzerConfiguration analyzer: (optional) Schema for a search
18051-
analyzer configuration.
18065+
:param AnalyzerConfiguration analyzer: (optional) Analyzer configuration
18066+
for search indexes. The default and fields properties are only applicable
18067+
for the `perfield` analyzer name.
1805218068
"""
1805318069
self.analyzer = analyzer
1805418070
self.index = index

test/integration/test_cloudant_v1.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ def test_put_design_document(self):
744744
analyzer_configuration_model = {
745745
'name': 'standard',
746746
'stopwords': ['testString'],
747+
'default': analyzer_model,
747748
'fields': {'key1': analyzer_model},
748749
}
749750
# Construct a dict representation of a SearchIndexDefinition model

0 commit comments

Comments
 (0)