Skip to content

Commit 41121e7

Browse files
kai687millotp
andauthored
fix(specs): attribute and index names case sensitive (#2990)
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
1 parent 316d83d commit 41121e7

File tree

10 files changed

+41
-24
lines changed

10 files changed

+41
-24
lines changed

specs/abtesting/common/parameters.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ID:
1010
# misc
1111
index:
1212
type: string
13-
description: A/B test index.
13+
description: Index name of the A/B test variant (case-sensitive).
1414
example: 'delcourt_production'
1515

1616
abTestID:

specs/common/parameters.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ id:
137137
indexName:
138138
type: string
139139
example: products
140-
description: Index name.
140+
description: Index name (case-sensitive).
141141

142142
hitsPerPage:
143143
type: integer

specs/common/schemas/IndexSettings.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ baseIndexSettings:
2222
description: |
2323
Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/).
2424
25-
Facets are ways to categorize search results based on attributes.
26-
Facets can be used to let user filter search results.
25+
Facets are attributes that let you categorize search results.
26+
They can be used for filtering search results.
2727
By default, no attribute is used for faceting.
28+
Attribute names are case-sensitive.
2829
2930
**Modifiers**
3031
@@ -84,6 +85,7 @@ baseIndexSettings:
8485
8586
This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/),
8687
but don't want to include it in the search results.
88+
Attribute names are case-sensitive.
8789
default: []
8890
x-categories:
8991
- Attributes
@@ -106,6 +108,7 @@ baseIndexSettings:
106108
107109
Transliteration supports searching in any of the Japanese writing systems.
108110
To support transliteration, you must set the indexing language to Japanese.
111+
Attribute names are case-sensitive.
109112
type: array
110113
items:
111114
type: string
@@ -119,7 +122,9 @@ baseIndexSettings:
119122
items:
120123
type: string
121124
example: [description]
122-
description: Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.
125+
description: |
126+
Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.
127+
Attribute names are case-sensitive.
123128
default: []
124129
x-categories:
125130
- Languages
@@ -130,6 +135,7 @@ baseIndexSettings:
130135
- name
131136
description: |
132137
Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding).
138+
Attribute names are case-sensitive.
133139
134140
Compound words are formed by combining two or more individual words,
135141
and are particularly prevalent in Germanic languages—for example, "firefighter".
@@ -164,7 +170,9 @@ baseIndexSettings:
164170
type: string
165171
example:
166172
- sku
167-
description: Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).
173+
description: |
174+
Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).
175+
Attribute names are case-sensitive.
168176
default: []
169177
x-categories:
170178
- Query strategy
@@ -182,6 +190,7 @@ baseIndexSettings:
182190
type: string
183191
description: |
184192
Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).
193+
Attribute names are case-sensitive.
185194
186195
By default, all numeric attributes are available as numerical filters.
187196
For faster indexing, reduce the number of numeric attributes.
@@ -221,7 +230,7 @@ baseIndexSettings:
221230
- unordered(text)
222231
- emails.personal
223232
description: |
224-
Attributes used for searching.
233+
Attributes used for searching. Attribute names are case-sensitive.
225234
226235
By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off.
227236
With a non-empty list, Algolia only returns results with matches in the selected attributes.
@@ -260,6 +269,7 @@ baseIndexSettings:
260269
attributeForDistinct:
261270
description: |
262271
Attribute that should be used to establish groups of results.
272+
Attribute names are case-sensitive.
263273
264274
All records with the same value for this attribute are considered a group.
265275
You can combine `attributeForDistinct` with the `distinct` search parameter to control
@@ -286,6 +296,7 @@ indexSettingsAsSearchParams:
286296
Attributes to include in the API response.
287297
288298
To reduce the size of your response, you can retrieve only some of the attributes.
299+
Attribute names are case-sensitive.
289300
290301
- `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.
291302
- To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`.
@@ -335,6 +346,7 @@ indexSettingsAsSearchParams:
335346
- asc(price)
336347
description: |
337348
Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/).
349+
Attribute names are case-sensitive.
338350
339351
The custom ranking attributes decide which items are shown first if the other ranking criteria are equal.
340352
@@ -376,6 +388,7 @@ indexSettingsAsSearchParams:
376388
377389
By default, all searchable attributes are highlighted.
378390
Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.
391+
Attribute names are case-sensitive.
379392
380393
With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.
381394
You can use this to visually highlight matching parts of a search query in your UI.
@@ -392,6 +405,7 @@ indexSettingsAsSearchParams:
392405
- description
393406
description: |
394407
Attributes for which to enable snippets.
408+
Attribute names are case-sensitive.
395409
396410
Snippets provide additional context to matched words.
397411
If you enable snippets, they include 10 words, including the matched word.
@@ -461,6 +475,7 @@ indexSettingsAsSearchParams:
461475
- sku
462476
description: |
463477
Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
478+
Attribute names are case-sensitive.
464479
465480
Returning only exact matches can help when:
466481
@@ -584,6 +599,7 @@ indexSettingsAsSearchParams:
584599
- description
585600
description: |
586601
Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).
602+
Attribute names are case-sensitive.
587603
588604
This can be useful for attributes with long values, where the likelyhood of an exact match is high,
589605
such as product descriptions.
@@ -741,7 +757,7 @@ maxFacetHits:
741757

742758
reRankingApplyFilter:
743759
description: |
744-
Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
760+
Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
745761
oneOf:
746762
- $ref: './SearchParams.yml#/listOfSearchFilters'
747763
- type: string

specs/common/schemas/SearchParams.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ searchParams:
55

66
searchParamsObject:
77
title: Search parameters as object
8+
description: Each parameter value, including the `query` must not be larger than 512 bytes.
89
allOf:
910
- $ref: '#/baseSearchParams'
1011
- $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams'
@@ -69,7 +70,9 @@ baseSearchParamsWithoutQuery:
6970
items:
7071
type: string
7172
example: [title, author]
72-
description: Restricts a search to a subset of your searchable attributes.
73+
description: |
74+
Restricts a search to a subset of your searchable attributes.
75+
Attribute names are case-sensitive.
7376
default: []
7477
x-categories:
7578
- Filtering
@@ -132,7 +135,7 @@ baseSearchParamsWithoutQuery:
132135
naturalLanguages:
133136
type: array
134137
items:
135-
type: string
138+
$ref: './IndexSettings.yml#/supportedLanguage'
136139
description: |
137140
ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches):
138141
@@ -335,9 +338,9 @@ insideBoundingBox:
335338
type: array
336339
items:
337340
type: array
341+
minItems: 4
342+
maxItems: 4
338343
items:
339-
minItems: 4
340-
maxItems: 4
341344
type: number
342345
format: double
343346
description: |
@@ -357,9 +360,9 @@ insidePolygon:
357360
type: array
358361
items:
359362
type: array
363+
minItems: 6
364+
maxItems: 20000
360365
items:
361-
minItems: 6
362-
maxItems: 20000
363366
type: number
364367
format: double
365368
description: |
@@ -368,7 +371,7 @@ insidePolygon:
368371
Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude.
369372
Provide multiple polygons as nested arrays.
370373
For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
371-
This parameter is ignored, if you also specify `insideBoundingBox`.
374+
This parameter is ignored if you also specify `insideBoundingBox`.
372375
example:
373376
- [47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9]
374377
- [40.9234, 2.1185, 38.6430, 1.9916, 39.2587, 2.0104]

specs/ingestion/common/schemas/destination.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ DestinationIndexName:
128128
properties:
129129
indexName:
130130
type: string
131-
description: Algolia index name.
131+
description: Algolia index name (case-sensitive).
132132
recordType:
133133
$ref: '#/RecordType'
134134
attributesToExclude:

specs/insights/common/schemas/EventAttributes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ eventName:
1313

1414
index:
1515
type: string
16-
description: Index name to which the event's items belong.
16+
description: Index name (case-sensitive) to which the event's items belong.
1717
example: YourIndexName
1818

1919
userToken:

specs/query-suggestions/common/schemas/QuerySuggestionsConfiguration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ SourceIndex:
6969
properties:
7070
indexName:
7171
type: string
72-
description: Name of the Algolia index to use as source for query suggestions.
72+
description: Name of the Algolia index (case-sensitive) to use as source for query suggestions.
7373
example: products
7474
replicas:
7575
type: boolean
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
title: indexName
22
type: string
3-
description: Name of the Query Suggestions index.
3+
description: Name of the Query Suggestions index (case-sensitive).
44
example: products_query_suggestions

specs/search/paths/objects/multipleBatch.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ post:
3131
type: object
3232
description: Operation arguments (varies with specified `action`).
3333
indexName:
34-
type: string
35-
description: Index to target for this operation.
36-
example: 'index1'
34+
$ref: '../../../common/parameters.yml#/indexName'
3735
required:
3836
- action
3937
- body

tests/CTS/requests/search/search.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@
443443
"minWordSizefor2Typos": 0,
444444
"minimumAroundRadius": 1,
445445
"naturalLanguages": [
446-
""
446+
"fr"
447447
],
448448
"numericFilters": [
449449
""
@@ -618,7 +618,7 @@
618618
"minWordSizefor2Typos": 0,
619619
"minimumAroundRadius": 1,
620620
"naturalLanguages": [
621-
""
621+
"fr"
622622
],
623623
"numericFilters": [
624624
""

0 commit comments

Comments
 (0)