Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(specs): attribute and index names case sensitive #2990

Merged
merged 4 commits into from
Apr 15, 2024
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
2 changes: 1 addition & 1 deletion specs/abtesting/common/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ID:
# misc
index:
type: string
description: A/B test index.
description: Index name of the A/B test variant (case-sensitive).
example: 'delcourt_production'

abTestID:
Expand Down
2 changes: 1 addition & 1 deletion specs/common/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ id:
indexName:
type: string
example: products
description: Index name.
description: Index name (case-sensitive).

hitsPerPage:
type: integer
Expand Down
28 changes: 22 additions & 6 deletions specs/common/schemas/IndexSettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ baseIndexSettings:
description: |
Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/).

Facets are ways to categorize search results based on attributes.
Facets can be used to let user filter search results.
Facets are attributes that let you categorize search results.
They can be used for filtering search results.
By default, no attribute is used for faceting.
Attribute names are case-sensitive.

**Modifiers**

Expand Down Expand Up @@ -84,6 +85,7 @@ baseIndexSettings:

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/),
but don't want to include it in the search results.
Attribute names are case-sensitive.
default: []
x-categories:
- Attributes
Expand All @@ -106,6 +108,7 @@ baseIndexSettings:

Transliteration supports searching in any of the Japanese writing systems.
To support transliteration, you must set the indexing language to Japanese.
Attribute names are case-sensitive.
type: array
items:
type: string
Expand All @@ -119,7 +122,9 @@ baseIndexSettings:
items:
type: string
example: [description]
description: Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.
description: |
Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.
Attribute names are case-sensitive.
default: []
x-categories:
- Languages
Expand All @@ -130,6 +135,7 @@ baseIndexSettings:
- name
description: |
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).
Attribute names are case-sensitive.

Compound words are formed by combining two or more individual words,
and are particularly prevalent in Germanic languages—for example, "firefighter".
Expand Down Expand Up @@ -164,7 +170,9 @@ baseIndexSettings:
type: string
example:
- sku
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).
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).
Attribute names are case-sensitive.
default: []
x-categories:
- Query strategy
Expand All @@ -182,6 +190,7 @@ baseIndexSettings:
type: string
description: |
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).
Attribute names are case-sensitive.

By default, all numeric attributes are available as numerical filters.
For faster indexing, reduce the number of numeric attributes.
Expand Down Expand Up @@ -221,7 +230,7 @@ baseIndexSettings:
- unordered(text)
- emails.personal
description: |
Attributes used for searching.
Attributes used for searching. Attribute names are case-sensitive.

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.
With a non-empty list, Algolia only returns results with matches in the selected attributes.
Expand Down Expand Up @@ -260,6 +269,7 @@ baseIndexSettings:
attributeForDistinct:
description: |
Attribute that should be used to establish groups of results.
Attribute names are case-sensitive.

All records with the same value for this attribute are considered a group.
You can combine `attributeForDistinct` with the `distinct` search parameter to control
Expand All @@ -286,6 +296,7 @@ indexSettingsAsSearchParams:
Attributes to include in the API response.

To reduce the size of your response, you can retrieve only some of the attributes.
Attribute names are case-sensitive.

- `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.
- To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`.
Expand Down Expand Up @@ -335,6 +346,7 @@ indexSettingsAsSearchParams:
- asc(price)
description: |
Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/).
Attribute names are case-sensitive.

The custom ranking attributes decide which items are shown first if the other ranking criteria are equal.

Expand Down Expand Up @@ -376,6 +388,7 @@ indexSettingsAsSearchParams:

By default, all searchable attributes are highlighted.
Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.
Attribute names are case-sensitive.

With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.
You can use this to visually highlight matching parts of a search query in your UI.
Expand All @@ -392,6 +405,7 @@ indexSettingsAsSearchParams:
- description
description: |
Attributes for which to enable snippets.
Attribute names are case-sensitive.

Snippets provide additional context to matched words.
If you enable snippets, they include 10 words, including the matched word.
Expand Down Expand Up @@ -461,6 +475,7 @@ indexSettingsAsSearchParams:
- sku
description: |
Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
Attribute names are case-sensitive.

Returning only exact matches can help when:

Expand Down Expand Up @@ -584,6 +599,7 @@ indexSettingsAsSearchParams:
- description
description: |
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).
Attribute names are case-sensitive.

This can be useful for attributes with long values, where the likelyhood of an exact match is high,
such as product descriptions.
Expand Down Expand Up @@ -741,7 +757,7 @@ maxFacetHits:

reRankingApplyFilter:
description: |
Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
oneOf:
- $ref: './SearchParams.yml#/listOfSearchFilters'
- type: string
Expand Down
17 changes: 10 additions & 7 deletions specs/common/schemas/SearchParams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ searchParams:

searchParamsObject:
title: Search parameters as object
description: Each parameter value, including the `query` must not be larger than 512 bytes.
allOf:
- $ref: '#/baseSearchParams'
- $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams'
Expand Down Expand Up @@ -69,7 +70,9 @@ baseSearchParamsWithoutQuery:
items:
type: string
example: [title, author]
description: Restricts a search to a subset of your searchable attributes.
description: |
Restricts a search to a subset of your searchable attributes.
Attribute names are case-sensitive.
default: []
x-categories:
- Filtering
Expand Down Expand Up @@ -132,7 +135,7 @@ baseSearchParamsWithoutQuery:
naturalLanguages:
type: array
items:
type: string
$ref: './IndexSettings.yml#/supportedLanguage'
description: |
ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches):

Expand Down Expand Up @@ -335,9 +338,9 @@ insideBoundingBox:
type: array
items:
type: array
minItems: 4
maxItems: 4
items:
minItems: 4
maxItems: 4
type: number
format: double
description: |
Expand All @@ -357,9 +360,9 @@ insidePolygon:
type: array
items:
type: array
minItems: 6
maxItems: 20000
items:
minItems: 6
maxItems: 20000
type: number
format: double
description: |
Expand All @@ -368,7 +371,7 @@ insidePolygon:
Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude.
Provide multiple polygons as nested arrays.
For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
This parameter is ignored, if you also specify `insideBoundingBox`.
This parameter is ignored if you also specify `insideBoundingBox`.
example:
- [47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9]
- [40.9234, 2.1185, 38.6430, 1.9916, 39.2587, 2.0104]
Expand Down
2 changes: 1 addition & 1 deletion specs/ingestion/common/schemas/destination.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ DestinationIndexName:
properties:
indexName:
type: string
description: Algolia index name.
description: Algolia index name (case-sensitive).
recordType:
$ref: '#/RecordType'
attributesToExclude:
Expand Down
2 changes: 1 addition & 1 deletion specs/insights/common/schemas/EventAttributes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ eventName:

index:
type: string
description: Index name to which the event's items belong.
description: Index name (case-sensitive) to which the event's items belong.
example: YourIndexName

userToken:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ SourceIndex:
properties:
indexName:
type: string
description: Name of the Algolia index to use as source for query suggestions.
description: Name of the Algolia index (case-sensitive) to use as source for query suggestions.
example: products
replicas:
type: boolean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: indexName
type: string
description: Name of the Query Suggestions index.
description: Name of the Query Suggestions index (case-sensitive).
example: products_query_suggestions
4 changes: 1 addition & 3 deletions specs/search/paths/objects/multipleBatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ post:
type: object
description: Operation arguments (varies with specified `action`).
indexName:
type: string
description: Index to target for this operation.
example: 'index1'
$ref: '../../../common/parameters.yml#/indexName'
required:
- action
- body
Expand Down
4 changes: 2 additions & 2 deletions tests/CTS/requests/search/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
"minWordSizefor2Typos": 0,
"minimumAroundRadius": 1,
"naturalLanguages": [
""
"fr"
],
"numericFilters": [
""
Expand Down Expand Up @@ -618,7 +618,7 @@
"minWordSizefor2Typos": 0,
"minimumAroundRadius": 1,
"naturalLanguages": [
""
"fr"
],
"numericFilters": [
""
Expand Down
Loading