Skip to content

Commit 18cf38f

Browse files
committed
fix: enum proposal
1 parent ff4ab77 commit 18cf38f

File tree

2 files changed

+25
-26
lines changed

2 files changed

+25
-26
lines changed

specs/common/schemas/IndexSettings.yml

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ advancedSyntax:
464464
advancedSyntaxFeatures:
465465
type: array
466466
items:
467-
$ref: '#/advancedSyntaxFeaturesEnum'
467+
$ref: './SearchEnums.yml#/advancedSyntaxFeatures'
468468
description: |
469469
Advanced search syntax features you want to support
470470
- `exactPhrase`.
@@ -478,12 +478,6 @@ advancedSyntaxFeatures:
478478
x-categories:
479479
- Query strategy
480480

481-
advancedSyntaxFeaturesEnum:
482-
type: string
483-
enum: [exactPhrase, excludeWords]
484-
x-categories:
485-
- Query strategy
486-
487481
allowTyposOnNumericTokens:
488482
type: boolean
489483
description: |
@@ -497,7 +491,7 @@ allowTyposOnNumericTokens:
497491
alternativesAsExact:
498492
type: array
499493
items:
500-
$ref: '#/alternativesAsExactEnum'
494+
$ref: './SearchEnums.yml#/alternativesAsExact'
501495
description: |
502496
Determine which plurals and synonyms should be considered an exact matches
503497
By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.
@@ -514,12 +508,6 @@ alternativesAsExact:
514508
x-categories:
515509
- Query strategy
516510

517-
alternativesAsExactEnum:
518-
type: string
519-
enum: [ignorePlurals, singleWordSynonym, multiWordsSynonym, ignoreConjugations]
520-
x-categories:
521-
- Query strategy
522-
523511
attributeCriteriaComputedByMinProximity:
524512
type: boolean
525513
description: |
@@ -889,21 +877,10 @@ typoTolerance:
889877
- type: boolean
890878
default: true
891879
description: Whether typo tolerance is active. If true, matches with typos are included in the search results and rank after exact matches.
892-
- $ref: '#/typoToleranceEnum'
880+
- $ref: './SearchEnums.yml#/typoTolerance'
893881
x-categories:
894882
- Typos
895883

896-
typoToleranceEnum:
897-
type: string
898-
title: typo tolerance
899-
description: |
900-
- `min`. Return matches with the lowest number of typos.
901-
For example, if you have matches without typos, only include those.
902-
But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).
903-
- `strict`. Return matches with the two lowest numbers of typos.
904-
With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
905-
enum: [min, strict, 'true', 'false']
906-
907884
ignorePlurals:
908885
description: |
909886
Treat singular, plurals, and other forms of declensions as equivalent.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
advancedSyntaxFeatures:
2+
type: string
3+
enum: [exactPhrase, excludeWords]
4+
x-categories:
5+
- Query strategy
6+
7+
alternativesAsExact:
8+
type: string
9+
enum: [ignorePlurals, singleWordSynonym, multiWordsSynonym, ignoreConjugations]
10+
x-categories:
11+
- Query strategy
12+
13+
typoTolerance:
14+
type: string
15+
title: typo tolerance
16+
description: |
17+
- `min`. Return matches with the lowest number of typos.
18+
For example, if you have matches without typos, only include those.
19+
But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).
20+
- `strict`. Return matches with the two lowest numbers of typos.
21+
With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
22+
enum: [min, strict, 'true', 'false']

0 commit comments

Comments
 (0)