Skip to content

Commit ef562e2

Browse files
authored
pull new openapi changes and run code-gen (#79)
1 parent 8bd3fd7 commit ef562e2

14 files changed

Lines changed: 120 additions & 108 deletions

openapi.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2562,6 +2562,10 @@ components:
25622562
type: string
25632563
description: >
25642564
Name of a field in another collection that should be linked to this collection so that it can be joined during query.
2565+
async_reference:
2566+
type: boolean
2567+
description: >
2568+
Allow documents to be indexed successfully even when the referenced document doesn't exist yet.
25652569
num_dim:
25662570
type: integer
25672571
example: 256
@@ -3287,7 +3291,7 @@ components:
32873291
filter_curated_hits:
32883292
type: boolean
32893293
description: >
3290-
Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false
3294+
Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false
32913295
enable_synonyms:
32923296
type: boolean
32933297
description: >
@@ -3310,8 +3314,8 @@ components:
33103314
at Position 1 and another record with ID 456 at Position 5,
33113315
you'd specify `123:1,456:5`.
33123316
3313-
You could also use the Overrides feature to override search results based
3314-
on rules. Overrides are applied first, followed by `pinned_hits` and
3317+
You could also use the Curation feature to override search results based
3318+
on rules. Curations are applied first, followed by `pinned_hits` and
33153319
finally `hidden_hits`.
33163320
type: string
33173321

@@ -3321,12 +3325,12 @@ components:
33213325
A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456,
33223326
you'd specify `123,456`.
33233327
3324-
You could also use the Overrides feature to override search results based
3325-
on rules. Overrides are applied first, followed by `pinned_hits` and
3328+
You could also use the Curation feature to override search results based
3329+
on rules. Curations are applied first, followed by `pinned_hits` and
33263330
finally `hidden_hits`.
33273331
type: string
33283332

3329-
override_tags:
3333+
curation_tags:
33303334
description: Comma separated list of tags to trigger the curations rules that match the tags.
33313335
type: string
33323336

@@ -3359,9 +3363,9 @@ components:
33593363
the name of the existing Preset.
33603364
type: string
33613365

3362-
enable_overrides:
3366+
enable_curations:
33633367
description: >
3364-
If you have some overrides defined but want to disable all of them during
3368+
If you have some curation sets defined but want to disable all of them during
33653369
query time, you can do that by setting this parameter to false
33663370
type: boolean
33673371
default: false
@@ -3664,7 +3668,7 @@ components:
36643668
filter_curated_hits:
36653669
type: boolean
36663670
description: >
3667-
Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false
3671+
Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false
36683672
enable_synonyms:
36693673
type: boolean
36703674
description: >
@@ -3695,8 +3699,8 @@ components:
36953699
at Position 1 and another record with ID 456 at Position 5,
36963700
you'd specify `123:1,456:5`.
36973701
3698-
You could also use the Overrides feature to override search results based
3699-
on rules. Overrides are applied first, followed by `pinned_hits` and
3702+
You could also use the Curation feature to override search results based
3703+
on rules. Curations are applied first, followed by `pinned_hits` and
37003704
finally `hidden_hits`.
37013705
type: string
37023706

@@ -3706,12 +3710,12 @@ components:
37063710
A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456,
37073711
you'd specify `123,456`.
37083712
3709-
You could also use the Overrides feature to override search results based
3710-
on rules. Overrides are applied first, followed by `pinned_hits` and
3713+
You could also use the Curation feature to override search results based
3714+
on rules. Curations are applied first, followed by `pinned_hits` and
37113715
finally `hidden_hits`.
37123716
type: string
37133717

3714-
override_tags:
3718+
curation_tags:
37153719
description: Comma separated list of tags to trigger the curations rules that match the tags.
37163720
type: string
37173721

@@ -3737,9 +3741,9 @@ components:
37373741
the name of the existing Preset.
37383742
type: string
37393743

3740-
enable_overrides:
3744+
enable_curations:
37413745
description: >
3742-
If you have some overrides defined but want to disable all of them during
3746+
If you have some curation sets defined but want to disable all of them during
37433747
query time, you can do that by setting this parameter to false
37443748
type: boolean
37453749
default: false
@@ -4432,7 +4436,6 @@ components:
44324436
items:
44334437
$ref: "#/components/schemas/SynonymSetSchema"
44344438

4435-
44364439
SynonymSetDeleteSchema:
44374440
type: object
44384441
required:

preprocessed_openapi.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ paths:
634634
schema:
635635
type: boolean
636636
description: |
637-
Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false
637+
Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false
638638
- name: enable_synonyms
639639
in: query
640640
schema:
@@ -659,15 +659,15 @@ paths:
659659
type: string
660660
description: |
661661
A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`.
662-
You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
662+
You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
663663
- name: hidden_hits
664664
in: query
665665
schema:
666666
type: string
667667
description: |
668668
A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`.
669-
You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
670-
- name: override_tags
669+
You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
670+
- name: curation_tags
671671
in: query
672672
schema:
673673
type: string
@@ -697,13 +697,13 @@ paths:
697697
type: string
698698
description: |
699699
Search using a bunch of search parameters by setting this parameter to the name of the existing Preset.
700-
- name: enable_overrides
700+
- name: enable_curations
701701
in: query
702702
schema:
703703
type: boolean
704704
default: false
705705
description: |
706-
If you have some overrides defined but want to disable all of them during query time, you can do that by setting this parameter to false
706+
If you have some curation sets defined but want to disable all of them during query time, you can do that by setting this parameter to false
707707
- name: prioritize_exact_match
708708
in: query
709709
schema:
@@ -2239,7 +2239,7 @@ paths:
22392239
schema:
22402240
type: boolean
22412241
description: |
2242-
Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false
2242+
Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false
22432243
- name: enable_synonyms
22442244
in: query
22452245
schema:
@@ -2271,15 +2271,15 @@ paths:
22712271
type: string
22722272
description: |
22732273
A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`.
2274-
You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
2274+
You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
22752275
- name: hidden_hits
22762276
in: query
22772277
schema:
22782278
type: string
22792279
description: |
22802280
A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`.
2281-
You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
2282-
- name: override_tags
2281+
You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
2282+
- name: curation_tags
22832283
in: query
22842284
schema:
22852285
type: string
@@ -2304,13 +2304,13 @@ paths:
23042304
type: string
23052305
description: |
23062306
Search using a bunch of search parameters by setting this parameter to the name of the existing Preset.
2307-
- name: enable_overrides
2307+
- name: enable_curations
23082308
in: query
23092309
schema:
23102310
type: boolean
23112311
default: false
23122312
description: |
2313-
If you have some overrides defined but want to disable all of them during query time, you can do that by setting this parameter to false
2313+
If you have some curation sets defined but want to disable all of them during query time, you can do that by setting this parameter to false
23142314
- name: prioritize_exact_match
23152315
in: query
23162316
schema:
@@ -3353,6 +3353,10 @@ components:
33533353
type: string
33543354
description: |
33553355
Name of a field in another collection that should be linked to this collection so that it can be joined during query.
3356+
async_reference:
3357+
type: boolean
3358+
description: |
3359+
Allow documents to be indexed successfully even when the referenced document doesn't exist yet.
33563360
num_dim:
33573361
type: integer
33583362
example: 256
@@ -3988,7 +3992,7 @@ components:
39883992
filter_curated_hits:
39893993
type: boolean
39903994
description: |
3991-
Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false
3995+
Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false
39923996
enable_synonyms:
39933997
type: boolean
39943998
description: |
@@ -4005,13 +4009,13 @@ components:
40054009
type: string
40064010
description: |
40074011
A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`.
4008-
You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
4012+
You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
40094013
hidden_hits:
40104014
type: string
40114015
description: |
40124016
A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`.
4013-
You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
4014-
override_tags:
4017+
You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
4018+
curation_tags:
40154019
type: string
40164020
description: Comma separated list of tags to trigger the curations rules that match the tags.
40174021
highlight_fields:
@@ -4031,11 +4035,11 @@ components:
40314035
type: string
40324036
description: |
40334037
Search using a bunch of search parameters by setting this parameter to the name of the existing Preset.
4034-
enable_overrides:
4038+
enable_curations:
40354039
type: boolean
40364040
default: false
40374041
description: |
4038-
If you have some overrides defined but want to disable all of them during query time, you can do that by setting this parameter to false
4042+
If you have some curation sets defined but want to disable all of them during query time, you can do that by setting this parameter to false
40394043
prioritize_exact_match:
40404044
type: boolean
40414045
default: true
@@ -4241,7 +4245,7 @@ components:
42414245
filter_curated_hits:
42424246
type: boolean
42434247
description: |
4244-
Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false
4248+
Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false
42454249
enable_synonyms:
42464250
type: boolean
42474251
description: |
@@ -4263,13 +4267,13 @@ components:
42634267
type: string
42644268
description: |
42654269
A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`.
4266-
You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
4270+
You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
42674271
hidden_hits:
42684272
type: string
42694273
description: |
42704274
A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`.
4271-
You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
4272-
override_tags:
4275+
You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`.
4276+
curation_tags:
42734277
type: string
42744278
description: Comma separated list of tags to trigger the curations rules that match the tags.
42754279
highlight_fields:
@@ -4286,11 +4290,11 @@ components:
42864290
type: string
42874291
description: |
42884292
Search using a bunch of search parameters by setting this parameter to the name of the existing Preset.
4289-
enable_overrides:
4293+
enable_curations:
42904294
type: boolean
42914295
default: false
42924296
description: |
4293-
If you have some overrides defined but want to disable all of them during query time, you can do that by setting this parameter to false
4297+
If you have some curation sets defined but want to disable all of them during query time, you can do that by setting this parameter to false
42944298
prioritize_exact_match:
42954299
type: boolean
42964300
default: true

typesense/src/client/collection/documents.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ where
149149
drop_tokens_mode: params.drop_tokens_mode,
150150
drop_tokens_threshold: params.drop_tokens_threshold,
151151
enable_highlight_v1: params.enable_highlight_v1,
152-
enable_overrides: params.enable_overrides,
152+
enable_curations: params.enable_curations,
153153
enable_synonyms: params.enable_synonyms,
154154
enable_typos_for_alpha_numerical_tokens: params.enable_typos_for_alpha_numerical_tokens,
155155
enable_typos_for_numerical_tokens: params.enable_typos_for_numerical_tokens,
@@ -182,7 +182,7 @@ where
182182
min_len_2typo: params.min_len_2typo,
183183
num_typos: params.num_typos,
184184
offset: params.offset,
185-
override_tags: params.override_tags,
185+
curation_tags: params.curation_tags,
186186
page: params.page,
187187
per_page: params.per_page,
188188
pinned_hits: params.pinned_hits,

typesense/src/client/multi_search.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ fn build_multi_search_params<'a>(
286286
conversation_model_id: params.conversation_model_id,
287287
drop_tokens_mode: params.drop_tokens_mode,
288288
drop_tokens_threshold: params.drop_tokens_threshold,
289-
enable_overrides: params.enable_overrides,
289+
enable_curations: params.enable_curations,
290290
enable_synonyms: params.enable_synonyms,
291291
enable_typos_for_alpha_numerical_tokens: params.enable_typos_for_alpha_numerical_tokens,
292292
enable_typos_for_numerical_tokens: params.enable_typos_for_numerical_tokens,
@@ -317,7 +317,7 @@ fn build_multi_search_params<'a>(
317317
min_len_2typo: params.min_len_2typo,
318318
num_typos: params.num_typos,
319319
offset: params.offset,
320-
override_tags: params.override_tags,
320+
curation_tags: params.curation_tags,
321321
page: params.page,
322322
per_page: params.per_page,
323323
pinned_hits: params.pinned_hits,

0 commit comments

Comments
 (0)