@relevanceai/sdk 1.107.0 → 1.109.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2112,6 +2112,43 @@ export interface paths {
|
|
|
2112
2112
|
*/
|
|
2113
2113
|
post: operations["PaginateDocuments"];
|
|
2114
2114
|
};
|
|
2115
|
+
"/datasets/{dataset_id}/summaries/create": {
|
|
2116
|
+
/**
|
|
2117
|
+
* ### Required permissions
|
|
2118
|
+
* > [
|
|
2119
|
+
* {
|
|
2120
|
+
* "actions": [
|
|
2121
|
+
* "datasets:read",
|
|
2122
|
+
* "datasets:write"
|
|
2123
|
+
* ],
|
|
2124
|
+
* "datasets": [
|
|
2125
|
+
* {
|
|
2126
|
+
* "params": "dataset_id"
|
|
2127
|
+
* }
|
|
2128
|
+
* ]
|
|
2129
|
+
* }
|
|
2130
|
+
* ]
|
|
2131
|
+
*/
|
|
2132
|
+
post: operations["CreateDatasetSummary"];
|
|
2133
|
+
};
|
|
2134
|
+
"/datasets/{dataset_id}/summaries/history/list": {
|
|
2135
|
+
/**
|
|
2136
|
+
* ### Required permissions
|
|
2137
|
+
* > [
|
|
2138
|
+
* {
|
|
2139
|
+
* "actions": [
|
|
2140
|
+
* "datasets:read"
|
|
2141
|
+
* ],
|
|
2142
|
+
* "datasets": [
|
|
2143
|
+
* {
|
|
2144
|
+
* "params": "dataset_id"
|
|
2145
|
+
* }
|
|
2146
|
+
* ]
|
|
2147
|
+
* }
|
|
2148
|
+
* ]
|
|
2149
|
+
*/
|
|
2150
|
+
get: operations["ListDatasetSummaryHistory"];
|
|
2151
|
+
};
|
|
2115
2152
|
"/datasets/{dataset_id}/documents/bulk_get": {
|
|
2116
2153
|
/**
|
|
2117
2154
|
* Retrieve documents by their IDs ("_id" field). This will retrieve the documents faster than a filter applied on the "_id" field. For single id lookup version of this request use /datasets/{dataset_id}/documents/get.
|
|
@@ -2445,6 +2482,41 @@ export interface paths {
|
|
|
2445
2482
|
*/
|
|
2446
2483
|
post: operations["CreateSavedFilter"];
|
|
2447
2484
|
};
|
|
2485
|
+
"/components/{component_id}/delete": {
|
|
2486
|
+
/**
|
|
2487
|
+
* ### Required permissions
|
|
2488
|
+
* > []
|
|
2489
|
+
*/
|
|
2490
|
+
post: operations["DeleteComponent"];
|
|
2491
|
+
};
|
|
2492
|
+
"/components/list": {
|
|
2493
|
+
/**
|
|
2494
|
+
* ### Required permissions
|
|
2495
|
+
* > []
|
|
2496
|
+
*/
|
|
2497
|
+
post: operations["ListComponents"];
|
|
2498
|
+
};
|
|
2499
|
+
"/components/{component_id}/update": {
|
|
2500
|
+
/**
|
|
2501
|
+
* ### Required permissions
|
|
2502
|
+
* > []
|
|
2503
|
+
*/
|
|
2504
|
+
post: operations["UpdateComponent"];
|
|
2505
|
+
};
|
|
2506
|
+
"/components/{component_id}/get": {
|
|
2507
|
+
/**
|
|
2508
|
+
* ### Required permissions
|
|
2509
|
+
* > []
|
|
2510
|
+
*/
|
|
2511
|
+
get: operations["GetComponent"];
|
|
2512
|
+
};
|
|
2513
|
+
"/components/create": {
|
|
2514
|
+
/**
|
|
2515
|
+
* ### Required permissions
|
|
2516
|
+
* > []
|
|
2517
|
+
*/
|
|
2518
|
+
post: operations["CreateComponent"];
|
|
2519
|
+
};
|
|
2448
2520
|
}
|
|
2449
2521
|
export interface components {
|
|
2450
2522
|
schemas: {
|
|
@@ -3898,6 +3970,8 @@ export interface components {
|
|
|
3898
3970
|
remove_words?: string[];
|
|
3899
3971
|
/** @default monthly */
|
|
3900
3972
|
date_interval?: "monthly" | "daily" | "yearly" | "hourly" | "minutely" | "weekly";
|
|
3973
|
+
/** @description If provided, group by field into n buckets in date range. */
|
|
3974
|
+
n_date_buckets?: number;
|
|
3901
3975
|
buckets?: Partial<{
|
|
3902
3976
|
histogram?: {
|
|
3903
3977
|
interval?: number;
|
|
@@ -4441,6 +4515,8 @@ export interface components {
|
|
|
4441
4515
|
remove_words?: string[];
|
|
4442
4516
|
/** @default monthly */
|
|
4443
4517
|
date_interval?: "monthly" | "daily" | "yearly" | "hourly" | "minutely" | "weekly";
|
|
4518
|
+
/** @description If provided, group by field into n buckets in date range. */
|
|
4519
|
+
n_date_buckets?: number;
|
|
4444
4520
|
buckets?: Partial<{
|
|
4445
4521
|
histogram?: {
|
|
4446
4522
|
interval?: number;
|
|
@@ -5027,6 +5103,8 @@ export interface components {
|
|
|
5027
5103
|
remove_words?: string[];
|
|
5028
5104
|
/** @default monthly */
|
|
5029
5105
|
date_interval?: "monthly" | "daily" | "yearly" | "hourly" | "minutely" | "weekly";
|
|
5106
|
+
/** @description If provided, group by field into n buckets in date range. */
|
|
5107
|
+
n_date_buckets?: number;
|
|
5030
5108
|
buckets?: Partial<{
|
|
5031
5109
|
histogram?: {
|
|
5032
5110
|
interval?: number;
|
|
@@ -6191,6 +6269,12 @@ export interface components {
|
|
|
6191
6269
|
alias?: string;
|
|
6192
6270
|
dataset_id?: string;
|
|
6193
6271
|
cluster_ids: unknown[];
|
|
6272
|
+
/** @description Whether to optionally only delete summaries matching the question suffix. */
|
|
6273
|
+
question_suffix?: string;
|
|
6274
|
+
/** @description Whether to optionally only delete summaries matching the question prefix. */
|
|
6275
|
+
question_prefix?: string;
|
|
6276
|
+
/** @description Whether to optionally only delete summaries matching the field. */
|
|
6277
|
+
field?: string;
|
|
6194
6278
|
};
|
|
6195
6279
|
DeleteClusterSummariesOutput: unknown;
|
|
6196
6280
|
CreateOrganizationInput: {
|
|
@@ -7010,7 +7094,7 @@ export interface components {
|
|
|
7010
7094
|
results: ({
|
|
7011
7095
|
workflow_id: string;
|
|
7012
7096
|
workflow_path?: string;
|
|
7013
|
-
|
|
7097
|
+
parameters_raw_?: {
|
|
7014
7098
|
[key: string]: unknown;
|
|
7015
7099
|
};
|
|
7016
7100
|
} & {
|
|
@@ -7021,7 +7105,7 @@ export interface components {
|
|
|
7021
7105
|
GetWorkflowTypeOutput: {
|
|
7022
7106
|
workflow_id: string;
|
|
7023
7107
|
workflow_path?: string;
|
|
7024
|
-
|
|
7108
|
+
parameters_raw_?: {
|
|
7025
7109
|
[key: string]: unknown;
|
|
7026
7110
|
};
|
|
7027
7111
|
} & {
|
|
@@ -7251,6 +7335,8 @@ export interface components {
|
|
|
7251
7335
|
* @default true
|
|
7252
7336
|
*/
|
|
7253
7337
|
ingest_in_background?: boolean;
|
|
7338
|
+
/** @description Whether to parse this blob in a workflow for csv files only. Required for csv files larger than 30mb. */
|
|
7339
|
+
run_csv_workflow?: boolean;
|
|
7254
7340
|
};
|
|
7255
7341
|
ParseBlobOutput: {
|
|
7256
7342
|
status: string;
|
|
@@ -9733,181 +9819,462 @@ export interface components {
|
|
|
9733
9819
|
/** @description Used in future requests to retrieve items after these values in the sort order. */
|
|
9734
9820
|
after_id: unknown[];
|
|
9735
9821
|
};
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
*/
|
|
9761
|
-
documents: {
|
|
9762
|
-
/** @description Measures how closely a document matches on query and vectorSearchQuery. */
|
|
9763
|
-
_relevance?: number;
|
|
9764
|
-
_chunk_results?: {
|
|
9765
|
-
[key: string]: {
|
|
9766
|
-
results: {
|
|
9767
|
-
_relevance?: number;
|
|
9768
|
-
}[];
|
|
9769
|
-
_relevance: number;
|
|
9770
|
-
};
|
|
9822
|
+
CreateDatasetSummaryInput: {
|
|
9823
|
+
filters?: (Partial<{
|
|
9824
|
+
/** @description Match where document[field] is in value list. */
|
|
9825
|
+
match?: {
|
|
9826
|
+
/** @description If matching on text, match even if there are extra words / case insensitivity */
|
|
9827
|
+
fuzzy?: boolean;
|
|
9828
|
+
/** @description Field to match on. */
|
|
9829
|
+
field?: string;
|
|
9830
|
+
/** @description Can be either a single item or a list of items to match on. */
|
|
9831
|
+
value: string | boolean | number | unknown[];
|
|
9832
|
+
};
|
|
9833
|
+
/** @description Match where document._id is in value list. */
|
|
9834
|
+
matchIds?: {
|
|
9835
|
+
/** @description Can be either a single item or a list of items to match on. */
|
|
9836
|
+
value: string | boolean | number | unknown[];
|
|
9837
|
+
};
|
|
9838
|
+
/** @description Match documents where greaterThan < document[field] < lessThan. Supports numbers and date strings. */
|
|
9839
|
+
range?: {
|
|
9840
|
+
/** @description Field to match on. */
|
|
9841
|
+
field?: string;
|
|
9842
|
+
greaterThan?: unknown;
|
|
9843
|
+
lessThan?: unknown;
|
|
9844
|
+
greaterThanOrEqualTo?: unknown;
|
|
9845
|
+
lessThanOrEqualTo?: unknown;
|
|
9771
9846
|
};
|
|
9772
|
-
}[];
|
|
9773
|
-
/** @description Used in future requests to retrieve items after these values in the sort order. */
|
|
9774
|
-
after_id: unknown[];
|
|
9775
|
-
};
|
|
9776
|
-
DeleteWhereInput: {
|
|
9777
|
-
[key: string]: unknown;
|
|
9778
|
-
} & {
|
|
9779
|
-
filters: unknown;
|
|
9780
|
-
};
|
|
9781
|
-
DeleteWhereOutput: {
|
|
9782
|
-
/** @description Completion status. */
|
|
9783
|
-
status: string;
|
|
9784
|
-
/** @description Response message for completion state. */
|
|
9785
|
-
message: string;
|
|
9786
|
-
};
|
|
9787
|
-
/**
|
|
9788
|
-
* @description Control which fields aggregate data will be generated for. Aggregate data will appear in the "aggregates" property of the response body.
|
|
9789
|
-
*
|
|
9790
|
-
* Each list element can be a string like "name" or a dictionary like {"field":"name","resultsSize":11}
|
|
9791
|
-
*
|
|
9792
|
-
* Default: []
|
|
9793
|
-
*
|
|
9794
|
-
* Example: ["name","price","likes_cats",{"field":"color","resultsSize":20}]
|
|
9795
|
-
*/
|
|
9796
|
-
fieldsToAggregate: (string | {
|
|
9797
|
-
/** @description Field to aggregate. */
|
|
9798
|
-
field?: string;
|
|
9799
|
-
/** @description Controls which field the aggregate output will be placed into. */
|
|
9800
|
-
outputField?: string;
|
|
9801
|
-
/**
|
|
9802
|
-
* @description Number of top aggregate results to return.
|
|
9803
|
-
* @default 10
|
|
9804
|
-
*/
|
|
9805
|
-
resultsSize?: number;
|
|
9806
|
-
/**
|
|
9807
|
-
* @description Sort aggregation results by count ascending or descending.
|
|
9808
|
-
* @default desc
|
|
9809
|
-
*/
|
|
9810
|
-
sort?: "asc" | "desc";
|
|
9811
|
-
page?: number;
|
|
9812
|
-
fieldsToAggregate?: components["schemas"]["fieldsToAggregate"];
|
|
9813
|
-
/** @description Whether to retrieve min, max, avg and sum stats for the field as well */
|
|
9814
|
-
getStats?: boolean;
|
|
9815
|
-
dateAggregate?: {
|
|
9816
|
-
/** @default monthly */
|
|
9817
|
-
date_interval?: "monthly" | "daily" | "yearly" | "hourly" | "minutely" | "weekly";
|
|
9818
|
-
};
|
|
9819
|
-
/** @description Retrieve documents for each aggregated category. use 'pageSize' to control the number of documents to retrieve, and 'includeFields' to only return certain fields. */
|
|
9820
|
-
getDocuments?: {
|
|
9821
|
-
pageSize?: number;
|
|
9822
|
-
includeFields?: string[];
|
|
9823
|
-
};
|
|
9824
|
-
chunkAggregate?: {
|
|
9825
|
-
chunkFieldName: string;
|
|
9826
|
-
filters?: components["schemas"]["simpleSearchAndFlatFilterItem"][];
|
|
9827
|
-
};
|
|
9828
|
-
})[];
|
|
9829
|
-
/**
|
|
9830
|
-
* @description Control which fields aggregate stats data will be generated for. This includes, min value, max value, average value, and document counts per interval within the dataset.
|
|
9831
|
-
*
|
|
9832
|
-
* Aggregate data will appear in the "aggregateStats" property of the response body.
|
|
9833
|
-
*
|
|
9834
|
-
* Each list item can be:
|
|
9835
|
-
*
|
|
9836
|
-
* a string stating which field to aggregate stats on
|
|
9837
|
-
*
|
|
9838
|
-
* An object containing "field" to pick a field, and "interval" to control the range of each bucket when counting documents:
|
|
9839
|
-
*
|
|
9840
|
-
* For example, if we had products {"price":50},{"price:"150"},{price:"180"},{"field":"price","interval":100} would split results into 2 buckets.
|
|
9841
|
-
*
|
|
9842
|
-
* Default: []
|
|
9843
|
-
* Example: ["postcode",{"field":"price","interval":10}]
|
|
9844
|
-
*/
|
|
9845
|
-
fieldsToAggregateStats: (string | {
|
|
9846
|
-
/** @description Field to return stats for in aggregateStats. */
|
|
9847
|
-
field?: string;
|
|
9848
|
-
/** @description Interval gap when building a histogram. An interval of 2 will count documents in range 0-2,2-4,4-6... */
|
|
9849
|
-
interval?: number;
|
|
9850
|
-
/** @description Controls which field the aggregate output will be placed into. */
|
|
9851
|
-
outputField?: string;
|
|
9852
|
-
})[];
|
|
9853
|
-
simpleSearchFilterItem: {
|
|
9854
|
-
/** @description Match where document[field] is in value list. */
|
|
9855
|
-
match?: {
|
|
9856
|
-
/** @description If matching on text, match even if there are extra words / case insensitivity */
|
|
9857
|
-
fuzzy?: boolean;
|
|
9858
|
-
/** @description Field to match on. */
|
|
9859
|
-
field?: string;
|
|
9860
|
-
/** @description Can be either a single item or a list of items to match on. */
|
|
9861
|
-
value: string | boolean | number | unknown[];
|
|
9862
|
-
};
|
|
9863
|
-
/** @description Match where document._id is in value list. */
|
|
9864
|
-
matchIds?: {
|
|
9865
|
-
/** @description Can be either a single item or a list of items to match on. */
|
|
9866
|
-
value: string | boolean | number | unknown[];
|
|
9867
|
-
};
|
|
9868
|
-
/** @description Match documents where greaterThan < document[field] < lessThan. Supports numbers and date strings. */
|
|
9869
|
-
range?: {
|
|
9870
|
-
/** @description Field to match on. */
|
|
9871
|
-
field?: string;
|
|
9872
|
-
greaterThan?: unknown;
|
|
9873
|
-
lessThan?: unknown;
|
|
9874
|
-
greaterThanOrEqualTo?: unknown;
|
|
9875
|
-
lessThanOrEqualTo?: unknown;
|
|
9876
|
-
};
|
|
9877
|
-
/**
|
|
9878
|
-
* @description
|
|
9879
|
-
* Match documents where the field either contains the value as a substring, or matches a provided matching pattern.
|
|
9880
|
-
*
|
|
9881
|
-
* Possible matching patterns:
|
|
9882
|
-
*
|
|
9883
|
-
* * - documents where the field has any value
|
|
9884
|
-
* ? - documents where a single character from the field matches the provided values
|
|
9885
|
-
*
|
|
9886
|
-
* Example:
|
|
9887
|
-
*
|
|
9888
|
-
* {
|
|
9889
|
-
* wildcard: {
|
|
9890
|
-
* field: "title",
|
|
9891
|
-
* value: [ "Avenger*" ]
|
|
9892
|
-
* }
|
|
9893
|
-
* }
|
|
9894
|
-
*/
|
|
9895
|
-
wildcard?: {
|
|
9896
|
-
/** @description Field to match on. */
|
|
9897
|
-
field?: string;
|
|
9898
|
-
/** @description single string or array of valid wildcard strings to match on, for example ['tele*'] */
|
|
9899
|
-
value: string | string[];
|
|
9900
|
-
};
|
|
9901
|
-
/** @description hybrid search query that must reach a certain value to filter */
|
|
9902
|
-
search?: {
|
|
9903
9847
|
/**
|
|
9904
|
-
* @description
|
|
9848
|
+
* @description
|
|
9849
|
+
* Match documents where the field either contains the value as a substring, or matches a provided matching pattern.
|
|
9905
9850
|
*
|
|
9906
|
-
*
|
|
9851
|
+
* Possible matching patterns:
|
|
9907
9852
|
*
|
|
9908
|
-
*
|
|
9909
|
-
|
|
9910
|
-
|
|
9853
|
+
* * - documents where the field has any value
|
|
9854
|
+
* ? - documents where a single character from the field matches the provided values
|
|
9855
|
+
*
|
|
9856
|
+
* Example:
|
|
9857
|
+
*
|
|
9858
|
+
* {
|
|
9859
|
+
* wildcard: {
|
|
9860
|
+
* field: "title",
|
|
9861
|
+
* value: [ "Avenger*" ]
|
|
9862
|
+
* }
|
|
9863
|
+
* }
|
|
9864
|
+
*/
|
|
9865
|
+
wildcard?: {
|
|
9866
|
+
/** @description Field to match on. */
|
|
9867
|
+
field?: string;
|
|
9868
|
+
/** @description single string or array of valid wildcard strings to match on, for example ['tele*'] */
|
|
9869
|
+
value: string | string[];
|
|
9870
|
+
};
|
|
9871
|
+
/** @description hybrid search query that must reach a certain value to filter */
|
|
9872
|
+
search?: {
|
|
9873
|
+
/**
|
|
9874
|
+
* @description Search for documents that contain this query string in your dataset. Use fieldsToSearch parameter to restrict which fields are searched.
|
|
9875
|
+
*
|
|
9876
|
+
* "tele" matches "Television", "This television is an excellent product…"
|
|
9877
|
+
*
|
|
9878
|
+
* Example: "tele"
|
|
9879
|
+
*/
|
|
9880
|
+
query?: string;
|
|
9881
|
+
/** @description Configuration for traditional search query. */
|
|
9882
|
+
queryConfig?: {
|
|
9883
|
+
/**
|
|
9884
|
+
* @description Increases or decreases the impact of all traditional search matching when calculating a documents _relevance.
|
|
9885
|
+
* @default 1
|
|
9886
|
+
*/
|
|
9887
|
+
weight?: number;
|
|
9888
|
+
/**
|
|
9889
|
+
* @description Increases or decreases the impact of sentence matching when calculating a documents _relevance.
|
|
9890
|
+
* For example, with query "A fox jumped", with high sentence weight, 'A fox jumped over the' would match before 'jumped a fox over fox'
|
|
9891
|
+
* @default 1
|
|
9892
|
+
*/
|
|
9893
|
+
sentenceWeight?: number;
|
|
9894
|
+
/**
|
|
9895
|
+
* @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
|
|
9896
|
+
* For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
|
|
9897
|
+
* @default 1
|
|
9898
|
+
*/
|
|
9899
|
+
fuzzyWeight?: number;
|
|
9900
|
+
};
|
|
9901
|
+
/**
|
|
9902
|
+
* @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
|
|
9903
|
+
*
|
|
9904
|
+
* For example if field "animaltype_vector_" contains encoded vector values for "cat", lion, "dog","bird", and "query" is set to "kitten", documents with "cat", "lion" will be returned first in the results list.
|
|
9905
|
+
*
|
|
9906
|
+
* It can be an object or a list of objects.
|
|
9907
|
+
*
|
|
9908
|
+
*
|
|
9909
|
+
*
|
|
9910
|
+
* Example payloads:
|
|
9911
|
+
*
|
|
9912
|
+
* {"field":"animaltype_vector_","query":"kitten"}
|
|
9913
|
+
*
|
|
9914
|
+
* [
|
|
9915
|
+
*
|
|
9916
|
+
* {"field":"animaltype_vector_","query":"kitten","weight":1","model":"text"}, {"field":"animaltype_vector_","query":"https://www.dogimage.com/dogimage.png","model":"image","weight":2}
|
|
9917
|
+
*
|
|
9918
|
+
* ]
|
|
9919
|
+
*/
|
|
9920
|
+
vectorSearchQuery?: {
|
|
9921
|
+
/** @description Vector name to search on. For example, title_vector_ */
|
|
9922
|
+
field: string;
|
|
9923
|
+
/** @description Query to transform to a vector and then search with. Default to query in the root body if not provided. */
|
|
9924
|
+
query?: string;
|
|
9925
|
+
/**
|
|
9926
|
+
* @description Model name to generate the vector with.
|
|
9927
|
+
* @default text
|
|
9928
|
+
*/
|
|
9929
|
+
model?: string;
|
|
9930
|
+
/** @description Model url to use for encoding. If model and model_url are both set, model_url will override it. */
|
|
9931
|
+
model_url?: string;
|
|
9932
|
+
/**
|
|
9933
|
+
* @description Increases or decreases the impact of this vector fields match on documents relevance score.
|
|
9934
|
+
* @default 1
|
|
9935
|
+
*/
|
|
9936
|
+
weight?: number;
|
|
9937
|
+
/** @description Instead of generating a vector by vectorising the query, use the vector provided here for vector search. */
|
|
9938
|
+
vector?: number[];
|
|
9939
|
+
chunkConfig?: {
|
|
9940
|
+
chunkField: string;
|
|
9941
|
+
page?: number;
|
|
9942
|
+
pageSize?: number;
|
|
9943
|
+
};
|
|
9944
|
+
} | {
|
|
9945
|
+
/** @description Vector name to search on. For example, title_vector_ */
|
|
9946
|
+
field: string;
|
|
9947
|
+
/** @description Query to transform to a vector and then search with. Default to query in the root body if not provided. */
|
|
9948
|
+
query?: string;
|
|
9949
|
+
/**
|
|
9950
|
+
* @description Model name to generate the vector with.
|
|
9951
|
+
* @default text
|
|
9952
|
+
*/
|
|
9953
|
+
model?: string;
|
|
9954
|
+
/** @description Model url to use for encoding. If model and model_url are both set, model_url will override it. */
|
|
9955
|
+
model_url?: string;
|
|
9956
|
+
/**
|
|
9957
|
+
* @description Increases or decreases the impact of this vector fields match on documents relevance score.
|
|
9958
|
+
* @default 1
|
|
9959
|
+
*/
|
|
9960
|
+
weight?: number;
|
|
9961
|
+
/** @description Instead of generating a vector by vectorising the query, use the vector provided here for vector search. */
|
|
9962
|
+
vector?: number[];
|
|
9963
|
+
chunkConfig?: {
|
|
9964
|
+
chunkField: string;
|
|
9965
|
+
page?: number;
|
|
9966
|
+
pageSize?: number;
|
|
9967
|
+
};
|
|
9968
|
+
}[];
|
|
9969
|
+
realtimeClustering?: {
|
|
9970
|
+
/** @default 4 */
|
|
9971
|
+
nClusters?: number;
|
|
9972
|
+
/** @default kmeans-realtime-4 */
|
|
9973
|
+
alias?: string;
|
|
9974
|
+
vectorField: string;
|
|
9975
|
+
/** @default _cluster_.{vector_field}.{alias} */
|
|
9976
|
+
outputField?: string;
|
|
9977
|
+
};
|
|
9978
|
+
/**
|
|
9979
|
+
* @description A list of fields to search using the "query" parameter.
|
|
9980
|
+
*
|
|
9981
|
+
* Each item can be field name as a string, or an object with 'field' as field name and optional parameters such as field weight.
|
|
9982
|
+
*
|
|
9983
|
+
* Default behaviour is to search all fields.
|
|
9984
|
+
*
|
|
9985
|
+
* Example: ["name",{"field":"favourite_color","weight":0.2}]
|
|
9986
|
+
*/
|
|
9987
|
+
fieldsToSearch?: (string | {
|
|
9988
|
+
/** @description Field name to search. */
|
|
9989
|
+
field?: string;
|
|
9990
|
+
/**
|
|
9991
|
+
* @description Multiply the relevance contribution of a specific field when using traditional search.
|
|
9992
|
+
* @default 1
|
|
9993
|
+
*/
|
|
9994
|
+
weight?: number;
|
|
9995
|
+
/** @description Enabled text search on chunk fields. Scoring will take the max similarity of any subitem within the chunk. */
|
|
9996
|
+
chunkField?: string;
|
|
9997
|
+
})[];
|
|
9998
|
+
/**
|
|
9999
|
+
* @description Only return documents with a _relevance above this threshold.
|
|
10000
|
+
*
|
|
10001
|
+
* Example: 0.3
|
|
10002
|
+
*/
|
|
10003
|
+
minimumRelevance: number;
|
|
10004
|
+
};
|
|
10005
|
+
/** @description Match documents where field specified by 'field' exists in the document. for nested fields, use syntax: a.b.c */
|
|
10006
|
+
fieldExists?: {
|
|
10007
|
+
/** @description Field that must exist. */
|
|
10008
|
+
field?: string;
|
|
10009
|
+
};
|
|
10010
|
+
/** @description Match documents where doc[field] % module == value */
|
|
10011
|
+
matchModulo?: {
|
|
10012
|
+
/** @default _id */
|
|
10013
|
+
field?: string;
|
|
10014
|
+
modulo: number;
|
|
10015
|
+
value: number;
|
|
10016
|
+
};
|
|
10017
|
+
/** @description Filter down to one document for each value of selected field. */
|
|
10018
|
+
dedupeByValue?: {
|
|
10019
|
+
/** @description Field to filter on. */
|
|
10020
|
+
field: string;
|
|
10021
|
+
};
|
|
10022
|
+
/** @description Match documents where document[a] <=/>=/</>/==/!=/stringEquals document[b]. Use stringEquals to compare strings. */
|
|
10023
|
+
selfreference?: {
|
|
10024
|
+
/** @description First field in comparison. */
|
|
10025
|
+
a: string;
|
|
10026
|
+
/** @description Second field in comparison. */
|
|
10027
|
+
b: string;
|
|
10028
|
+
/** @description Operator used to compare a and b. */
|
|
10029
|
+
operation: "<=" | ">=" | "<" | ">" | "==" | "!=" | "stringEquals";
|
|
10030
|
+
};
|
|
10031
|
+
/** @description Match documents where greaterThan < wordCount(document[field]) < lessThan. */
|
|
10032
|
+
wordCount?: {
|
|
10033
|
+
/** @description Field to match on. */
|
|
10034
|
+
field: string;
|
|
10035
|
+
/** @description Minimum word count. */
|
|
10036
|
+
greaterThan?: number;
|
|
10037
|
+
/** @description Maximum word count. */
|
|
10038
|
+
lessThan?: number;
|
|
10039
|
+
};
|
|
10040
|
+
/** @description Match documents where greaterThan < characterCount(document[field]) < lessThan. */
|
|
10041
|
+
characterCount?: {
|
|
10042
|
+
/** @description Field to match on. */
|
|
10043
|
+
field: string;
|
|
10044
|
+
/** @description Minimum character count. */
|
|
10045
|
+
greaterThan?: number;
|
|
10046
|
+
/** @description Maximum character count. */
|
|
10047
|
+
lessThan?: number;
|
|
10048
|
+
};
|
|
10049
|
+
/** @description Used to perform a logical OR of filters. each element of the OR list can itself be a list to perform a nested AND. {or:[[A,B],C]} is equivalent to (A AND B) OR C */
|
|
10050
|
+
or?: (components["schemas"]["simpleSearchAndFlatFilterItem"][] | components["schemas"]["simpleSearchAndFlatFilterItem"])[];
|
|
10051
|
+
/** @description Used to perform NOT filter. Can be a single filter or a list of filters to perform a !(AND). {not:[A,B]} is equivalent to !(A AND B) */
|
|
10052
|
+
not?: components["schemas"]["simpleSearchAndFlatFilterItem"][] | components["schemas"]["simpleSearchAndFlatFilterItem"];
|
|
10053
|
+
/** @description Filter based on data within a _chunk_ field. */
|
|
10054
|
+
chunk?: {
|
|
10055
|
+
/** @description The path of the chunk field to filter on. For example: description_sentences_chunk_ */
|
|
10056
|
+
path: string;
|
|
10057
|
+
filters: components["schemas"]["simpleSearchAndFlatFilterItem"][];
|
|
10058
|
+
};
|
|
10059
|
+
}> & Partial<{
|
|
10060
|
+
strict?: "must" | "should" | "must_or";
|
|
10061
|
+
condition?: string;
|
|
10062
|
+
field?: string;
|
|
10063
|
+
filter_type?: "text_match" | "word_match" | "term" | "terms" | "text" | "texts" | "match" | "contains" | "substring" | "class" | "category" | "exact_match" | "classes" | "categories" | "exists" | "traditional" | "fuzzy" | "regexp" | "ids" | "date" | "numeric" | "search" | "or" | "word_count" | "character_count" | "dedupe_by_value";
|
|
10064
|
+
condition_value?: unknown;
|
|
10065
|
+
fuzzy?: number;
|
|
10066
|
+
join?: boolean;
|
|
10067
|
+
}>)[];
|
|
10068
|
+
/** @description Fields to include in the search results, empty array/list means all fields. */
|
|
10069
|
+
select_fields?: string[];
|
|
10070
|
+
/** @description Size of each page of results. */
|
|
10071
|
+
page_size?: number;
|
|
10072
|
+
/** @description Size of each page of results. */
|
|
10073
|
+
page?: number;
|
|
10074
|
+
/** @description Fields to sort by. For each field, sort by descending or ascending. If you are using descending by datetime, it will get the most recent ones. */
|
|
10075
|
+
sort?: (string | {
|
|
10076
|
+
[key: string]: "asc" | "desc";
|
|
10077
|
+
})[];
|
|
10078
|
+
/** @description Include vectors in the search results. */
|
|
10079
|
+
include_vector?: boolean;
|
|
10080
|
+
/** @description (NOT IMPLEMENTED - not functional) If true, retrieves documents randomly. */
|
|
10081
|
+
is_random?: boolean;
|
|
10082
|
+
/** @description (NOT IMPLEMENTED - not functional)Random Seed for retrieving random documents. */
|
|
10083
|
+
random_state?: number;
|
|
10084
|
+
/** @description Retrieve items after these sort values in the sort order. */
|
|
10085
|
+
after_id?: unknown[];
|
|
10086
|
+
question: string;
|
|
10087
|
+
field: string;
|
|
10088
|
+
};
|
|
10089
|
+
CreateDatasetSummaryOutput: {
|
|
10090
|
+
question: string;
|
|
10091
|
+
answer: string;
|
|
10092
|
+
};
|
|
10093
|
+
ListDatasetSummaryHistoryInput: unknown;
|
|
10094
|
+
ListDatasetSummaryHistoryOutput: {
|
|
10095
|
+
results: {
|
|
10096
|
+
question?: string;
|
|
10097
|
+
prompt?: string;
|
|
10098
|
+
field?: string;
|
|
10099
|
+
answer?: string;
|
|
10100
|
+
dataset?: string;
|
|
10101
|
+
}[];
|
|
10102
|
+
};
|
|
10103
|
+
BulkGetDocumentsInput: {
|
|
10104
|
+
/** @description IDs of documents to retrieve */
|
|
10105
|
+
ids: string[];
|
|
10106
|
+
/** @description Fields to include in the search results, empty array/list means all fields. */
|
|
10107
|
+
select_fields?: string[];
|
|
10108
|
+
/** @description Include vectors in the search results */
|
|
10109
|
+
include_vector?: boolean;
|
|
10110
|
+
};
|
|
10111
|
+
BulkGetDocumentsOutput: {
|
|
10112
|
+
/** @description A list of documents. Document is a JSON-like data that we store our metadata and vectors with. For specifying id of the document use the field '_id', for specifying vector field use the suffix of '_vector_' */
|
|
10113
|
+
documents: unknown[];
|
|
10114
|
+
};
|
|
10115
|
+
BulkDeleteDocumentsInput: {
|
|
10116
|
+
/** @description IDs of documents to delete */
|
|
10117
|
+
ids: string[];
|
|
10118
|
+
};
|
|
10119
|
+
BulkDeleteDocumentsOutput: unknown;
|
|
10120
|
+
ListDocumentsInput: unknown;
|
|
10121
|
+
ListDocumentsOutput: {
|
|
10122
|
+
count: number;
|
|
10123
|
+
/**
|
|
10124
|
+
* @description List of documents. List items are affected by page, pageSize, query, filters. Items order is affected by vectorSeachQuery, sort, textSort.
|
|
10125
|
+
*
|
|
10126
|
+
* Example: [{"_id":"abcd","animal":"cat","price":10}, {"_id":"abcd","price":13}]
|
|
10127
|
+
*/
|
|
10128
|
+
documents: {
|
|
10129
|
+
/** @description Measures how closely a document matches on query and vectorSearchQuery. */
|
|
10130
|
+
_relevance?: number;
|
|
10131
|
+
_chunk_results?: {
|
|
10132
|
+
[key: string]: {
|
|
10133
|
+
results: {
|
|
10134
|
+
_relevance?: number;
|
|
10135
|
+
}[];
|
|
10136
|
+
_relevance: number;
|
|
10137
|
+
};
|
|
10138
|
+
};
|
|
10139
|
+
}[];
|
|
10140
|
+
/** @description Used in future requests to retrieve items after these values in the sort order. */
|
|
10141
|
+
after_id: unknown[];
|
|
10142
|
+
};
|
|
10143
|
+
DeleteWhereInput: {
|
|
10144
|
+
[key: string]: unknown;
|
|
10145
|
+
} & {
|
|
10146
|
+
filters: unknown;
|
|
10147
|
+
};
|
|
10148
|
+
DeleteWhereOutput: {
|
|
10149
|
+
/** @description Completion status. */
|
|
10150
|
+
status: string;
|
|
10151
|
+
/** @description Response message for completion state. */
|
|
10152
|
+
message: string;
|
|
10153
|
+
};
|
|
10154
|
+
/**
|
|
10155
|
+
* @description Control which fields aggregate data will be generated for. Aggregate data will appear in the "aggregates" property of the response body.
|
|
10156
|
+
*
|
|
10157
|
+
* Each list element can be a string like "name" or a dictionary like {"field":"name","resultsSize":11}
|
|
10158
|
+
*
|
|
10159
|
+
* Default: []
|
|
10160
|
+
*
|
|
10161
|
+
* Example: ["name","price","likes_cats",{"field":"color","resultsSize":20}]
|
|
10162
|
+
*/
|
|
10163
|
+
fieldsToAggregate: (string | {
|
|
10164
|
+
/** @description Field to aggregate. */
|
|
10165
|
+
field?: string;
|
|
10166
|
+
/** @description Controls which field the aggregate output will be placed into. */
|
|
10167
|
+
outputField?: string;
|
|
10168
|
+
/**
|
|
10169
|
+
* @description Number of top aggregate results to return.
|
|
10170
|
+
* @default 10
|
|
10171
|
+
*/
|
|
10172
|
+
resultsSize?: number;
|
|
10173
|
+
/**
|
|
10174
|
+
* @description Sort aggregation results by count ascending or descending.
|
|
10175
|
+
* @default desc
|
|
10176
|
+
*/
|
|
10177
|
+
sort?: "asc" | "desc";
|
|
10178
|
+
page?: number;
|
|
10179
|
+
fieldsToAggregate?: components["schemas"]["fieldsToAggregate"];
|
|
10180
|
+
/** @description Whether to retrieve min, max, avg and sum stats for the field as well */
|
|
10181
|
+
getStats?: boolean;
|
|
10182
|
+
dateAggregate?: {
|
|
10183
|
+
/** @default monthly */
|
|
10184
|
+
date_interval?: "monthly" | "daily" | "yearly" | "hourly" | "minutely" | "weekly";
|
|
10185
|
+
};
|
|
10186
|
+
/** @description Retrieve documents for each aggregated category. use 'pageSize' to control the number of documents to retrieve, and 'includeFields' to only return certain fields. */
|
|
10187
|
+
getDocuments?: {
|
|
10188
|
+
pageSize?: number;
|
|
10189
|
+
includeFields?: string[];
|
|
10190
|
+
};
|
|
10191
|
+
chunkAggregate?: {
|
|
10192
|
+
chunkFieldName: string;
|
|
10193
|
+
filters?: components["schemas"]["simpleSearchAndFlatFilterItem"][];
|
|
10194
|
+
};
|
|
10195
|
+
})[];
|
|
10196
|
+
/**
|
|
10197
|
+
* @description Control which fields aggregate stats data will be generated for. This includes, min value, max value, average value, and document counts per interval within the dataset.
|
|
10198
|
+
*
|
|
10199
|
+
* Aggregate data will appear in the "aggregateStats" property of the response body.
|
|
10200
|
+
*
|
|
10201
|
+
* Each list item can be:
|
|
10202
|
+
*
|
|
10203
|
+
* a string stating which field to aggregate stats on
|
|
10204
|
+
*
|
|
10205
|
+
* An object containing "field" to pick a field, and "interval" to control the range of each bucket when counting documents:
|
|
10206
|
+
*
|
|
10207
|
+
* For example, if we had products {"price":50},{"price:"150"},{price:"180"},{"field":"price","interval":100} would split results into 2 buckets.
|
|
10208
|
+
*
|
|
10209
|
+
* Default: []
|
|
10210
|
+
* Example: ["postcode",{"field":"price","interval":10}]
|
|
10211
|
+
*/
|
|
10212
|
+
fieldsToAggregateStats: (string | {
|
|
10213
|
+
/** @description Field to return stats for in aggregateStats. */
|
|
10214
|
+
field?: string;
|
|
10215
|
+
/** @description Interval gap when building a histogram. An interval of 2 will count documents in range 0-2,2-4,4-6... */
|
|
10216
|
+
interval?: number;
|
|
10217
|
+
/** @description Controls which field the aggregate output will be placed into. */
|
|
10218
|
+
outputField?: string;
|
|
10219
|
+
})[];
|
|
10220
|
+
simpleSearchFilterItem: {
|
|
10221
|
+
/** @description Match where document[field] is in value list. */
|
|
10222
|
+
match?: {
|
|
10223
|
+
/** @description If matching on text, match even if there are extra words / case insensitivity */
|
|
10224
|
+
fuzzy?: boolean;
|
|
10225
|
+
/** @description Field to match on. */
|
|
10226
|
+
field?: string;
|
|
10227
|
+
/** @description Can be either a single item or a list of items to match on. */
|
|
10228
|
+
value: string | boolean | number | unknown[];
|
|
10229
|
+
};
|
|
10230
|
+
/** @description Match where document._id is in value list. */
|
|
10231
|
+
matchIds?: {
|
|
10232
|
+
/** @description Can be either a single item or a list of items to match on. */
|
|
10233
|
+
value: string | boolean | number | unknown[];
|
|
10234
|
+
};
|
|
10235
|
+
/** @description Match documents where greaterThan < document[field] < lessThan. Supports numbers and date strings. */
|
|
10236
|
+
range?: {
|
|
10237
|
+
/** @description Field to match on. */
|
|
10238
|
+
field?: string;
|
|
10239
|
+
greaterThan?: unknown;
|
|
10240
|
+
lessThan?: unknown;
|
|
10241
|
+
greaterThanOrEqualTo?: unknown;
|
|
10242
|
+
lessThanOrEqualTo?: unknown;
|
|
10243
|
+
};
|
|
10244
|
+
/**
|
|
10245
|
+
* @description
|
|
10246
|
+
* Match documents where the field either contains the value as a substring, or matches a provided matching pattern.
|
|
10247
|
+
*
|
|
10248
|
+
* Possible matching patterns:
|
|
10249
|
+
*
|
|
10250
|
+
* * - documents where the field has any value
|
|
10251
|
+
* ? - documents where a single character from the field matches the provided values
|
|
10252
|
+
*
|
|
10253
|
+
* Example:
|
|
10254
|
+
*
|
|
10255
|
+
* {
|
|
10256
|
+
* wildcard: {
|
|
10257
|
+
* field: "title",
|
|
10258
|
+
* value: [ "Avenger*" ]
|
|
10259
|
+
* }
|
|
10260
|
+
* }
|
|
10261
|
+
*/
|
|
10262
|
+
wildcard?: {
|
|
10263
|
+
/** @description Field to match on. */
|
|
10264
|
+
field?: string;
|
|
10265
|
+
/** @description single string or array of valid wildcard strings to match on, for example ['tele*'] */
|
|
10266
|
+
value: string | string[];
|
|
10267
|
+
};
|
|
10268
|
+
/** @description hybrid search query that must reach a certain value to filter */
|
|
10269
|
+
search?: {
|
|
10270
|
+
/**
|
|
10271
|
+
* @description Search for documents that contain this query string in your dataset. Use fieldsToSearch parameter to restrict which fields are searched.
|
|
10272
|
+
*
|
|
10273
|
+
* "tele" matches "Television", "This television is an excellent product…"
|
|
10274
|
+
*
|
|
10275
|
+
* Example: "tele"
|
|
10276
|
+
*/
|
|
10277
|
+
query?: string;
|
|
9911
10278
|
/** @description Configuration for traditional search query. */
|
|
9912
10279
|
queryConfig?: {
|
|
9913
10280
|
/**
|
|
@@ -11729,6 +12096,42 @@ export interface components {
|
|
|
11729
12096
|
CreateSavedFilterOutput: {
|
|
11730
12097
|
id: string;
|
|
11731
12098
|
};
|
|
12099
|
+
DeleteComponentInput: unknown;
|
|
12100
|
+
DeleteComponentOutput: unknown;
|
|
12101
|
+
ListComponentsInput: {
|
|
12102
|
+
[key: string]: unknown;
|
|
12103
|
+
};
|
|
12104
|
+
ListComponentsOutput: {
|
|
12105
|
+
results: {
|
|
12106
|
+
_id?: string;
|
|
12107
|
+
configuration?: {
|
|
12108
|
+
[key: string]: unknown;
|
|
12109
|
+
};
|
|
12110
|
+
}[];
|
|
12111
|
+
};
|
|
12112
|
+
UpdateComponentInput: {
|
|
12113
|
+
_id?: string;
|
|
12114
|
+
configuration?: {
|
|
12115
|
+
[key: string]: unknown;
|
|
12116
|
+
};
|
|
12117
|
+
};
|
|
12118
|
+
UpdateComponentOutput: unknown;
|
|
12119
|
+
GetComponentInput: unknown;
|
|
12120
|
+
GetComponentOutput: {
|
|
12121
|
+
_id?: string;
|
|
12122
|
+
configuration?: {
|
|
12123
|
+
[key: string]: unknown;
|
|
12124
|
+
};
|
|
12125
|
+
};
|
|
12126
|
+
CreateComponentInput: {
|
|
12127
|
+
_id?: string;
|
|
12128
|
+
configuration?: {
|
|
12129
|
+
[key: string]: unknown;
|
|
12130
|
+
};
|
|
12131
|
+
};
|
|
12132
|
+
CreateComponentOutput: {
|
|
12133
|
+
id: string;
|
|
12134
|
+
};
|
|
11732
12135
|
};
|
|
11733
12136
|
}
|
|
11734
12137
|
export interface operations {
|
|
@@ -12045,12 +12448,281 @@ export interface operations {
|
|
|
12045
12448
|
ListDeployables: {
|
|
12046
12449
|
parameters: {
|
|
12047
12450
|
query: {
|
|
12451
|
+
filters?: (Partial<{
|
|
12452
|
+
/** @description Match where document[field] is in value list. */
|
|
12453
|
+
match?: {
|
|
12454
|
+
/** @description If matching on text, match even if there are extra words / case insensitivity */
|
|
12455
|
+
fuzzy?: boolean;
|
|
12456
|
+
/** @description Field to match on. */
|
|
12457
|
+
key?: string;
|
|
12458
|
+
/** @description Field to match on. */
|
|
12459
|
+
field?: string;
|
|
12460
|
+
/** @description Can be either a single item or a list of items to match on. */
|
|
12461
|
+
value: string | boolean | number | unknown[];
|
|
12462
|
+
};
|
|
12463
|
+
/** @description Match where document._id is in value list. */
|
|
12464
|
+
matchIds?: {
|
|
12465
|
+
/** @description Can be either a single item or a list of items to match on. */
|
|
12466
|
+
value: string | boolean | number | unknown[];
|
|
12467
|
+
};
|
|
12468
|
+
/** @description Match documents where greaterThan < document[field] < lessThan. Supports numbers and date strings. */
|
|
12469
|
+
range?: {
|
|
12470
|
+
/** @description Field to match on. */
|
|
12471
|
+
key?: string;
|
|
12472
|
+
/** @description Field to match on. */
|
|
12473
|
+
field?: string;
|
|
12474
|
+
greaterThan?: unknown;
|
|
12475
|
+
lessThan?: unknown;
|
|
12476
|
+
greaterThanOrEqualTo?: unknown;
|
|
12477
|
+
lessThanOrEqualTo?: unknown;
|
|
12478
|
+
};
|
|
12479
|
+
/**
|
|
12480
|
+
* @description
|
|
12481
|
+
* Match documents where the field either contains the value as a substring, or matches a provided matching pattern.
|
|
12482
|
+
*
|
|
12483
|
+
* Possible matching patterns:
|
|
12484
|
+
*
|
|
12485
|
+
* * - documents where the field has any value
|
|
12486
|
+
* ? - documents where a single character from the field matches the provided values
|
|
12487
|
+
*
|
|
12488
|
+
* Example:
|
|
12489
|
+
*
|
|
12490
|
+
* {
|
|
12491
|
+
* wildcard: {
|
|
12492
|
+
* field: "title",
|
|
12493
|
+
* value: [ "Avenger*" ]
|
|
12494
|
+
* }
|
|
12495
|
+
* }
|
|
12496
|
+
*/
|
|
12497
|
+
wildcard?: {
|
|
12498
|
+
/** @description Field to match on. */
|
|
12499
|
+
key?: string;
|
|
12500
|
+
/** @description Field to match on. */
|
|
12501
|
+
field?: string;
|
|
12502
|
+
/** @description single string or array of valid wildcard strings to match on, for example ['tele*'] */
|
|
12503
|
+
value: string | string[];
|
|
12504
|
+
};
|
|
12505
|
+
/** @description hybrid search query that must reach a certain value to filter */
|
|
12506
|
+
search?: {
|
|
12507
|
+
/**
|
|
12508
|
+
* @description Search for documents that contain this query string in your dataset. Use fieldsToSearch parameter to restrict which fields are searched.
|
|
12509
|
+
*
|
|
12510
|
+
* "tele" matches "Television", "This television is an excellent product…"
|
|
12511
|
+
*
|
|
12512
|
+
* Example: "tele"
|
|
12513
|
+
*/
|
|
12514
|
+
query?: string;
|
|
12515
|
+
/** @description Configuration for traditional search query. */
|
|
12516
|
+
queryConfig?: {
|
|
12517
|
+
/**
|
|
12518
|
+
* @description Increases or decreases the impact of all traditional search matching when calculating a documents _relevance.
|
|
12519
|
+
* @default 1
|
|
12520
|
+
*/
|
|
12521
|
+
weight?: number;
|
|
12522
|
+
/**
|
|
12523
|
+
* @description Increases or decreases the impact of sentence matching when calculating a documents _relevance.
|
|
12524
|
+
* For example, with query "A fox jumped", with high sentence weight, 'A fox jumped over the' would match before 'jumped a fox over fox'
|
|
12525
|
+
* @default 1
|
|
12526
|
+
*/
|
|
12527
|
+
sentenceWeight?: number;
|
|
12528
|
+
/**
|
|
12529
|
+
* @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
|
|
12530
|
+
* For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
|
|
12531
|
+
* @default 1
|
|
12532
|
+
*/
|
|
12533
|
+
fuzzyWeight?: number;
|
|
12534
|
+
};
|
|
12535
|
+
/**
|
|
12536
|
+
* @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
|
|
12537
|
+
*
|
|
12538
|
+
* For example if field "animaltype_vector_" contains encoded vector values for "cat", lion, "dog","bird", and "query" is set to "kitten", documents with "cat", "lion" will be returned first in the results list.
|
|
12539
|
+
*
|
|
12540
|
+
* It can be an object or a list of objects.
|
|
12541
|
+
*
|
|
12542
|
+
*
|
|
12543
|
+
*
|
|
12544
|
+
* Example payloads:
|
|
12545
|
+
*
|
|
12546
|
+
* {"field":"animaltype_vector_","query":"kitten"}
|
|
12547
|
+
*
|
|
12548
|
+
* [
|
|
12549
|
+
*
|
|
12550
|
+
* {"field":"animaltype_vector_","query":"kitten","weight":1","model":"text"}, {"field":"animaltype_vector_","query":"https://www.dogimage.com/dogimage.png","model":"image","weight":2}
|
|
12551
|
+
*
|
|
12552
|
+
* ]
|
|
12553
|
+
*/
|
|
12554
|
+
vectorSearchQuery?: {
|
|
12555
|
+
/** @description Vector name to search on. For example, title_vector_ */
|
|
12556
|
+
field: string;
|
|
12557
|
+
/** @description Query to transform to a vector and then search with. Default to query in the root body if not provided. */
|
|
12558
|
+
query?: string;
|
|
12559
|
+
/**
|
|
12560
|
+
* @description Model name to generate the vector with.
|
|
12561
|
+
* @default text
|
|
12562
|
+
*/
|
|
12563
|
+
model?: string;
|
|
12564
|
+
/** @description Model url to use for encoding. If model and model_url are both set, model_url will override it. */
|
|
12565
|
+
model_url?: string;
|
|
12566
|
+
/**
|
|
12567
|
+
* @description Increases or decreases the impact of this vector fields match on documents relevance score.
|
|
12568
|
+
* @default 1
|
|
12569
|
+
*/
|
|
12570
|
+
weight?: number;
|
|
12571
|
+
/** @description Instead of generating a vector by vectorising the query, use the vector provided here for vector search. */
|
|
12572
|
+
vector?: number[];
|
|
12573
|
+
chunkConfig?: {
|
|
12574
|
+
chunkField: string;
|
|
12575
|
+
page?: number;
|
|
12576
|
+
pageSize?: number;
|
|
12577
|
+
};
|
|
12578
|
+
} | {
|
|
12579
|
+
/** @description Vector name to search on. For example, title_vector_ */
|
|
12580
|
+
field: string;
|
|
12581
|
+
/** @description Query to transform to a vector and then search with. Default to query in the root body if not provided. */
|
|
12582
|
+
query?: string;
|
|
12583
|
+
/**
|
|
12584
|
+
* @description Model name to generate the vector with.
|
|
12585
|
+
* @default text
|
|
12586
|
+
*/
|
|
12587
|
+
model?: string;
|
|
12588
|
+
/** @description Model url to use for encoding. If model and model_url are both set, model_url will override it. */
|
|
12589
|
+
model_url?: string;
|
|
12590
|
+
/**
|
|
12591
|
+
* @description Increases or decreases the impact of this vector fields match on documents relevance score.
|
|
12592
|
+
* @default 1
|
|
12593
|
+
*/
|
|
12594
|
+
weight?: number;
|
|
12595
|
+
/** @description Instead of generating a vector by vectorising the query, use the vector provided here for vector search. */
|
|
12596
|
+
vector?: number[];
|
|
12597
|
+
chunkConfig?: {
|
|
12598
|
+
chunkField: string;
|
|
12599
|
+
page?: number;
|
|
12600
|
+
pageSize?: number;
|
|
12601
|
+
};
|
|
12602
|
+
}[];
|
|
12603
|
+
realtimeClustering?: {
|
|
12604
|
+
/** @default 4 */
|
|
12605
|
+
nClusters?: number;
|
|
12606
|
+
/** @default kmeans-realtime-4 */
|
|
12607
|
+
alias?: string;
|
|
12608
|
+
vectorField: string;
|
|
12609
|
+
/** @default _cluster_.{vector_field}.{alias} */
|
|
12610
|
+
outputField?: string;
|
|
12611
|
+
};
|
|
12612
|
+
/**
|
|
12613
|
+
* @description A list of fields to search using the "query" parameter.
|
|
12614
|
+
*
|
|
12615
|
+
* Each item can be field name as a string, or an object with 'field' as field name and optional parameters such as field weight.
|
|
12616
|
+
*
|
|
12617
|
+
* Default behaviour is to search all fields.
|
|
12618
|
+
*
|
|
12619
|
+
* Example: ["name",{"field":"favourite_color","weight":0.2}]
|
|
12620
|
+
*/
|
|
12621
|
+
fieldsToSearch?: (string | {
|
|
12622
|
+
/** @description Field name to search. */
|
|
12623
|
+
key?: string;
|
|
12624
|
+
/** @description Field name to search. */
|
|
12625
|
+
field?: string;
|
|
12626
|
+
/**
|
|
12627
|
+
* @description Multiply the relevance contribution of a specific field when using traditional search.
|
|
12628
|
+
* @default 1
|
|
12629
|
+
*/
|
|
12630
|
+
weight?: number;
|
|
12631
|
+
/** @description Enabled text search on chunk fields. Scoring will take the max similarity of any subitem within the chunk. */
|
|
12632
|
+
chunkField?: string;
|
|
12633
|
+
})[];
|
|
12634
|
+
/**
|
|
12635
|
+
* @description Only return documents with a _relevance above this threshold.
|
|
12636
|
+
*
|
|
12637
|
+
* Example: 0.3
|
|
12638
|
+
*/
|
|
12639
|
+
minimumRelevance: number;
|
|
12640
|
+
};
|
|
12641
|
+
/** @description Match documents where field specified by 'field' exists in the document. for nested fields, use syntax: a.b.c */
|
|
12642
|
+
fieldExists?: {
|
|
12643
|
+
/** @description Field that must exist. */
|
|
12644
|
+
key?: string;
|
|
12645
|
+
/** @description Field that must exist. */
|
|
12646
|
+
field?: string;
|
|
12647
|
+
};
|
|
12648
|
+
/** @description Match documents where doc[field] % module == value */
|
|
12649
|
+
matchModulo?: {
|
|
12650
|
+
/** @default _id */
|
|
12651
|
+
field?: string;
|
|
12652
|
+
modulo: number;
|
|
12653
|
+
value: number;
|
|
12654
|
+
};
|
|
12655
|
+
/** @description Filter down to one document for each value of selected field. */
|
|
12656
|
+
dedupeByValue?: {
|
|
12657
|
+
/** @description Field to filter on. */
|
|
12658
|
+
field: string;
|
|
12659
|
+
};
|
|
12660
|
+
/** @description Match documents where document[a] <=/>=/</>/==/!=/stringEquals document[b]. Use stringEquals to compare strings. */
|
|
12661
|
+
selfreference?: {
|
|
12662
|
+
/** @description First field in comparison. */
|
|
12663
|
+
a: string;
|
|
12664
|
+
/** @description Second field in comparison. */
|
|
12665
|
+
b: string;
|
|
12666
|
+
/** @description Operator used to compare a and b. */
|
|
12667
|
+
operation: "<=" | ">=" | "<" | ">" | "==" | "!=" | "stringEquals";
|
|
12668
|
+
};
|
|
12669
|
+
/** @description Match documents where greaterThan < wordCount(document[field]) < lessThan. */
|
|
12670
|
+
wordCount?: {
|
|
12671
|
+
/** @description Field to match on. */
|
|
12672
|
+
field: string;
|
|
12673
|
+
/** @description Minimum word count. */
|
|
12674
|
+
greaterThan?: number;
|
|
12675
|
+
/** @description Maximum word count. */
|
|
12676
|
+
lessThan?: number;
|
|
12677
|
+
};
|
|
12678
|
+
/** @description Match documents where greaterThan < characterCount(document[field]) < lessThan. */
|
|
12679
|
+
characterCount?: {
|
|
12680
|
+
/** @description Field to match on. */
|
|
12681
|
+
field: string;
|
|
12682
|
+
/** @description Minimum character count. */
|
|
12683
|
+
greaterThan?: number;
|
|
12684
|
+
/** @description Maximum character count. */
|
|
12685
|
+
lessThan?: number;
|
|
12686
|
+
};
|
|
12687
|
+
/** @description Used to perform a logical OR of filters. each element of the OR list can itself be a list to perform a nested AND. {or:[[A,B],C]} is equivalent to (A AND B) OR C */
|
|
12688
|
+
or?: (definitions["simpleSearchAndFlatFilterItem"][] | definitions["simpleSearchAndFlatFilterItem"])[];
|
|
12689
|
+
/** @description Used to perform NOT filter. Can be a single filter or a list of filters to perform a !(AND). {not:[A,B]} is equivalent to !(A AND B) */
|
|
12690
|
+
not?: definitions["simpleSearchAndFlatFilterItem"][] | definitions["simpleSearchAndFlatFilterItem"];
|
|
12691
|
+
/** @description Filter based on data within a _chunk_ field. */
|
|
12692
|
+
chunk?: {
|
|
12693
|
+
/** @description The path of the chunk field to filter on. For example: description_sentences_chunk_ */
|
|
12694
|
+
path: string;
|
|
12695
|
+
filters: definitions["simpleSearchAndFlatFilterItem"][];
|
|
12696
|
+
};
|
|
12697
|
+
}> & Partial<{
|
|
12698
|
+
strict?: "must" | "should" | "must_or";
|
|
12699
|
+
condition?: string;
|
|
12700
|
+
field?: string;
|
|
12701
|
+
filter_type?: "text_match" | "word_match" | "term" | "terms" | "text" | "texts" | "match" | "contains" | "substring" | "class" | "category" | "exact_match" | "classes" | "categories" | "exists" | "traditional" | "fuzzy" | "regexp" | "ids" | "date" | "numeric" | "search" | "or" | "word_count" | "character_count" | "dedupe_by_value";
|
|
12702
|
+
condition_value?: unknown;
|
|
12703
|
+
fuzzy?: number;
|
|
12704
|
+
join?: boolean;
|
|
12705
|
+
}>)[];
|
|
12706
|
+
/** Fields to include in the search results, empty array/list means all fields. */
|
|
12707
|
+
select_fields?: string[];
|
|
12708
|
+
/** Size of each page of results. */
|
|
12709
|
+
page_size?: number;
|
|
12710
|
+
/** Size of each page of results. */
|
|
12711
|
+
page?: number;
|
|
12712
|
+
/** Fields to sort by. For each field, sort by descending or ascending. If you are using descending by datetime, it will get the most recent ones. */
|
|
12713
|
+
sort?: (string | {
|
|
12714
|
+
[key: string]: "asc" | "desc";
|
|
12715
|
+
})[];
|
|
12716
|
+
/** Include vectors in the search results. */
|
|
12717
|
+
include_vector?: boolean;
|
|
12718
|
+
/** (NOT IMPLEMENTED - not functional) If true, retrieves documents randomly. */
|
|
12719
|
+
is_random?: boolean;
|
|
12720
|
+
/** (NOT IMPLEMENTED - not functional)Random Seed for retrieving random documents. */
|
|
12721
|
+
random_state?: number;
|
|
12722
|
+
/** Retrieve items after these sort values in the sort order. */
|
|
12723
|
+
after_id?: unknown[];
|
|
12048
12724
|
/** Unique name of the dataset */
|
|
12049
12725
|
dataset_id?: string;
|
|
12050
|
-
/** Page of the results */
|
|
12051
|
-
page?: number;
|
|
12052
|
-
/** Size of each page of results */
|
|
12053
|
-
page_size?: number;
|
|
12054
12726
|
};
|
|
12055
12727
|
};
|
|
12056
12728
|
responses: {
|
|
@@ -15937,15 +16609,358 @@ export interface operations {
|
|
|
15937
16609
|
/** successful operation */
|
|
15938
16610
|
200: {
|
|
15939
16611
|
content: {
|
|
15940
|
-
"application/json": components["schemas"]["PaginateDocumentsOutput"];
|
|
16612
|
+
"application/json": components["schemas"]["PaginateDocumentsOutput"];
|
|
16613
|
+
};
|
|
16614
|
+
};
|
|
16615
|
+
};
|
|
16616
|
+
requestBody: {
|
|
16617
|
+
content: {
|
|
16618
|
+
"application/json": components["schemas"]["PaginateDocumentsInput"];
|
|
16619
|
+
};
|
|
16620
|
+
};
|
|
16621
|
+
};
|
|
16622
|
+
/**
|
|
16623
|
+
* ### Required permissions
|
|
16624
|
+
* > [
|
|
16625
|
+
* {
|
|
16626
|
+
* "actions": [
|
|
16627
|
+
* "datasets:read",
|
|
16628
|
+
* "datasets:write"
|
|
16629
|
+
* ],
|
|
16630
|
+
* "datasets": [
|
|
16631
|
+
* {
|
|
16632
|
+
* "params": "dataset_id"
|
|
16633
|
+
* }
|
|
16634
|
+
* ]
|
|
16635
|
+
* }
|
|
16636
|
+
* ]
|
|
16637
|
+
*/
|
|
16638
|
+
CreateDatasetSummary: {
|
|
16639
|
+
parameters: {
|
|
16640
|
+
path: {
|
|
16641
|
+
/** ID of dataset */
|
|
16642
|
+
dataset_id: string;
|
|
16643
|
+
};
|
|
16644
|
+
};
|
|
16645
|
+
responses: {
|
|
16646
|
+
/** successful operation */
|
|
16647
|
+
200: {
|
|
16648
|
+
content: {
|
|
16649
|
+
"application/json": components["schemas"]["CreateDatasetSummaryOutput"];
|
|
16650
|
+
};
|
|
16651
|
+
};
|
|
16652
|
+
};
|
|
16653
|
+
requestBody: {
|
|
16654
|
+
content: {
|
|
16655
|
+
"application/json": components["schemas"]["CreateDatasetSummaryInput"];
|
|
16656
|
+
};
|
|
16657
|
+
};
|
|
16658
|
+
};
|
|
16659
|
+
/**
|
|
16660
|
+
* ### Required permissions
|
|
16661
|
+
* > [
|
|
16662
|
+
* {
|
|
16663
|
+
* "actions": [
|
|
16664
|
+
* "datasets:read"
|
|
16665
|
+
* ],
|
|
16666
|
+
* "datasets": [
|
|
16667
|
+
* {
|
|
16668
|
+
* "params": "dataset_id"
|
|
16669
|
+
* }
|
|
16670
|
+
* ]
|
|
16671
|
+
* }
|
|
16672
|
+
* ]
|
|
16673
|
+
*/
|
|
16674
|
+
ListDatasetSummaryHistory: {
|
|
16675
|
+
parameters: {
|
|
16676
|
+
path: {
|
|
16677
|
+
/** ID of dataset */
|
|
16678
|
+
dataset_id: string;
|
|
16679
|
+
};
|
|
16680
|
+
query: {
|
|
16681
|
+
filters?: (Partial<{
|
|
16682
|
+
/** @description Match where document[field] is in value list. */
|
|
16683
|
+
match?: {
|
|
16684
|
+
/** @description If matching on text, match even if there are extra words / case insensitivity */
|
|
16685
|
+
fuzzy?: boolean;
|
|
16686
|
+
/** @description Field to match on. */
|
|
16687
|
+
key?: string;
|
|
16688
|
+
/** @description Field to match on. */
|
|
16689
|
+
field?: string;
|
|
16690
|
+
/** @description Can be either a single item or a list of items to match on. */
|
|
16691
|
+
value: string | boolean | number | unknown[];
|
|
16692
|
+
};
|
|
16693
|
+
/** @description Match where document._id is in value list. */
|
|
16694
|
+
matchIds?: {
|
|
16695
|
+
/** @description Can be either a single item or a list of items to match on. */
|
|
16696
|
+
value: string | boolean | number | unknown[];
|
|
16697
|
+
};
|
|
16698
|
+
/** @description Match documents where greaterThan < document[field] < lessThan. Supports numbers and date strings. */
|
|
16699
|
+
range?: {
|
|
16700
|
+
/** @description Field to match on. */
|
|
16701
|
+
key?: string;
|
|
16702
|
+
/** @description Field to match on. */
|
|
16703
|
+
field?: string;
|
|
16704
|
+
greaterThan?: unknown;
|
|
16705
|
+
lessThan?: unknown;
|
|
16706
|
+
greaterThanOrEqualTo?: unknown;
|
|
16707
|
+
lessThanOrEqualTo?: unknown;
|
|
16708
|
+
};
|
|
16709
|
+
/**
|
|
16710
|
+
* @description
|
|
16711
|
+
* Match documents where the field either contains the value as a substring, or matches a provided matching pattern.
|
|
16712
|
+
*
|
|
16713
|
+
* Possible matching patterns:
|
|
16714
|
+
*
|
|
16715
|
+
* * - documents where the field has any value
|
|
16716
|
+
* ? - documents where a single character from the field matches the provided values
|
|
16717
|
+
*
|
|
16718
|
+
* Example:
|
|
16719
|
+
*
|
|
16720
|
+
* {
|
|
16721
|
+
* wildcard: {
|
|
16722
|
+
* field: "title",
|
|
16723
|
+
* value: [ "Avenger*" ]
|
|
16724
|
+
* }
|
|
16725
|
+
* }
|
|
16726
|
+
*/
|
|
16727
|
+
wildcard?: {
|
|
16728
|
+
/** @description Field to match on. */
|
|
16729
|
+
key?: string;
|
|
16730
|
+
/** @description Field to match on. */
|
|
16731
|
+
field?: string;
|
|
16732
|
+
/** @description single string or array of valid wildcard strings to match on, for example ['tele*'] */
|
|
16733
|
+
value: string | string[];
|
|
16734
|
+
};
|
|
16735
|
+
/** @description hybrid search query that must reach a certain value to filter */
|
|
16736
|
+
search?: {
|
|
16737
|
+
/**
|
|
16738
|
+
* @description Search for documents that contain this query string in your dataset. Use fieldsToSearch parameter to restrict which fields are searched.
|
|
16739
|
+
*
|
|
16740
|
+
* "tele" matches "Television", "This television is an excellent product…"
|
|
16741
|
+
*
|
|
16742
|
+
* Example: "tele"
|
|
16743
|
+
*/
|
|
16744
|
+
query?: string;
|
|
16745
|
+
/** @description Configuration for traditional search query. */
|
|
16746
|
+
queryConfig?: {
|
|
16747
|
+
/**
|
|
16748
|
+
* @description Increases or decreases the impact of all traditional search matching when calculating a documents _relevance.
|
|
16749
|
+
* @default 1
|
|
16750
|
+
*/
|
|
16751
|
+
weight?: number;
|
|
16752
|
+
/**
|
|
16753
|
+
* @description Increases or decreases the impact of sentence matching when calculating a documents _relevance.
|
|
16754
|
+
* For example, with query "A fox jumped", with high sentence weight, 'A fox jumped over the' would match before 'jumped a fox over fox'
|
|
16755
|
+
* @default 1
|
|
16756
|
+
*/
|
|
16757
|
+
sentenceWeight?: number;
|
|
16758
|
+
/**
|
|
16759
|
+
* @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
|
|
16760
|
+
* For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
|
|
16761
|
+
* @default 1
|
|
16762
|
+
*/
|
|
16763
|
+
fuzzyWeight?: number;
|
|
16764
|
+
};
|
|
16765
|
+
/**
|
|
16766
|
+
* @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
|
|
16767
|
+
*
|
|
16768
|
+
* For example if field "animaltype_vector_" contains encoded vector values for "cat", lion, "dog","bird", and "query" is set to "kitten", documents with "cat", "lion" will be returned first in the results list.
|
|
16769
|
+
*
|
|
16770
|
+
* It can be an object or a list of objects.
|
|
16771
|
+
*
|
|
16772
|
+
*
|
|
16773
|
+
*
|
|
16774
|
+
* Example payloads:
|
|
16775
|
+
*
|
|
16776
|
+
* {"field":"animaltype_vector_","query":"kitten"}
|
|
16777
|
+
*
|
|
16778
|
+
* [
|
|
16779
|
+
*
|
|
16780
|
+
* {"field":"animaltype_vector_","query":"kitten","weight":1","model":"text"}, {"field":"animaltype_vector_","query":"https://www.dogimage.com/dogimage.png","model":"image","weight":2}
|
|
16781
|
+
*
|
|
16782
|
+
* ]
|
|
16783
|
+
*/
|
|
16784
|
+
vectorSearchQuery?: {
|
|
16785
|
+
/** @description Vector name to search on. For example, title_vector_ */
|
|
16786
|
+
field: string;
|
|
16787
|
+
/** @description Query to transform to a vector and then search with. Default to query in the root body if not provided. */
|
|
16788
|
+
query?: string;
|
|
16789
|
+
/**
|
|
16790
|
+
* @description Model name to generate the vector with.
|
|
16791
|
+
* @default text
|
|
16792
|
+
*/
|
|
16793
|
+
model?: string;
|
|
16794
|
+
/** @description Model url to use for encoding. If model and model_url are both set, model_url will override it. */
|
|
16795
|
+
model_url?: string;
|
|
16796
|
+
/**
|
|
16797
|
+
* @description Increases or decreases the impact of this vector fields match on documents relevance score.
|
|
16798
|
+
* @default 1
|
|
16799
|
+
*/
|
|
16800
|
+
weight?: number;
|
|
16801
|
+
/** @description Instead of generating a vector by vectorising the query, use the vector provided here for vector search. */
|
|
16802
|
+
vector?: number[];
|
|
16803
|
+
chunkConfig?: {
|
|
16804
|
+
chunkField: string;
|
|
16805
|
+
page?: number;
|
|
16806
|
+
pageSize?: number;
|
|
16807
|
+
};
|
|
16808
|
+
} | {
|
|
16809
|
+
/** @description Vector name to search on. For example, title_vector_ */
|
|
16810
|
+
field: string;
|
|
16811
|
+
/** @description Query to transform to a vector and then search with. Default to query in the root body if not provided. */
|
|
16812
|
+
query?: string;
|
|
16813
|
+
/**
|
|
16814
|
+
* @description Model name to generate the vector with.
|
|
16815
|
+
* @default text
|
|
16816
|
+
*/
|
|
16817
|
+
model?: string;
|
|
16818
|
+
/** @description Model url to use for encoding. If model and model_url are both set, model_url will override it. */
|
|
16819
|
+
model_url?: string;
|
|
16820
|
+
/**
|
|
16821
|
+
* @description Increases or decreases the impact of this vector fields match on documents relevance score.
|
|
16822
|
+
* @default 1
|
|
16823
|
+
*/
|
|
16824
|
+
weight?: number;
|
|
16825
|
+
/** @description Instead of generating a vector by vectorising the query, use the vector provided here for vector search. */
|
|
16826
|
+
vector?: number[];
|
|
16827
|
+
chunkConfig?: {
|
|
16828
|
+
chunkField: string;
|
|
16829
|
+
page?: number;
|
|
16830
|
+
pageSize?: number;
|
|
16831
|
+
};
|
|
16832
|
+
}[];
|
|
16833
|
+
realtimeClustering?: {
|
|
16834
|
+
/** @default 4 */
|
|
16835
|
+
nClusters?: number;
|
|
16836
|
+
/** @default kmeans-realtime-4 */
|
|
16837
|
+
alias?: string;
|
|
16838
|
+
vectorField: string;
|
|
16839
|
+
/** @default _cluster_.{vector_field}.{alias} */
|
|
16840
|
+
outputField?: string;
|
|
16841
|
+
};
|
|
16842
|
+
/**
|
|
16843
|
+
* @description A list of fields to search using the "query" parameter.
|
|
16844
|
+
*
|
|
16845
|
+
* Each item can be field name as a string, or an object with 'field' as field name and optional parameters such as field weight.
|
|
16846
|
+
*
|
|
16847
|
+
* Default behaviour is to search all fields.
|
|
16848
|
+
*
|
|
16849
|
+
* Example: ["name",{"field":"favourite_color","weight":0.2}]
|
|
16850
|
+
*/
|
|
16851
|
+
fieldsToSearch?: (string | {
|
|
16852
|
+
/** @description Field name to search. */
|
|
16853
|
+
key?: string;
|
|
16854
|
+
/** @description Field name to search. */
|
|
16855
|
+
field?: string;
|
|
16856
|
+
/**
|
|
16857
|
+
* @description Multiply the relevance contribution of a specific field when using traditional search.
|
|
16858
|
+
* @default 1
|
|
16859
|
+
*/
|
|
16860
|
+
weight?: number;
|
|
16861
|
+
/** @description Enabled text search on chunk fields. Scoring will take the max similarity of any subitem within the chunk. */
|
|
16862
|
+
chunkField?: string;
|
|
16863
|
+
})[];
|
|
16864
|
+
/**
|
|
16865
|
+
* @description Only return documents with a _relevance above this threshold.
|
|
16866
|
+
*
|
|
16867
|
+
* Example: 0.3
|
|
16868
|
+
*/
|
|
16869
|
+
minimumRelevance: number;
|
|
16870
|
+
};
|
|
16871
|
+
/** @description Match documents where field specified by 'field' exists in the document. for nested fields, use syntax: a.b.c */
|
|
16872
|
+
fieldExists?: {
|
|
16873
|
+
/** @description Field that must exist. */
|
|
16874
|
+
key?: string;
|
|
16875
|
+
/** @description Field that must exist. */
|
|
16876
|
+
field?: string;
|
|
16877
|
+
};
|
|
16878
|
+
/** @description Match documents where doc[field] % module == value */
|
|
16879
|
+
matchModulo?: {
|
|
16880
|
+
/** @default _id */
|
|
16881
|
+
field?: string;
|
|
16882
|
+
modulo: number;
|
|
16883
|
+
value: number;
|
|
16884
|
+
};
|
|
16885
|
+
/** @description Filter down to one document for each value of selected field. */
|
|
16886
|
+
dedupeByValue?: {
|
|
16887
|
+
/** @description Field to filter on. */
|
|
16888
|
+
field: string;
|
|
16889
|
+
};
|
|
16890
|
+
/** @description Match documents where document[a] <=/>=/</>/==/!=/stringEquals document[b]. Use stringEquals to compare strings. */
|
|
16891
|
+
selfreference?: {
|
|
16892
|
+
/** @description First field in comparison. */
|
|
16893
|
+
a: string;
|
|
16894
|
+
/** @description Second field in comparison. */
|
|
16895
|
+
b: string;
|
|
16896
|
+
/** @description Operator used to compare a and b. */
|
|
16897
|
+
operation: "<=" | ">=" | "<" | ">" | "==" | "!=" | "stringEquals";
|
|
16898
|
+
};
|
|
16899
|
+
/** @description Match documents where greaterThan < wordCount(document[field]) < lessThan. */
|
|
16900
|
+
wordCount?: {
|
|
16901
|
+
/** @description Field to match on. */
|
|
16902
|
+
field: string;
|
|
16903
|
+
/** @description Minimum word count. */
|
|
16904
|
+
greaterThan?: number;
|
|
16905
|
+
/** @description Maximum word count. */
|
|
16906
|
+
lessThan?: number;
|
|
16907
|
+
};
|
|
16908
|
+
/** @description Match documents where greaterThan < characterCount(document[field]) < lessThan. */
|
|
16909
|
+
characterCount?: {
|
|
16910
|
+
/** @description Field to match on. */
|
|
16911
|
+
field: string;
|
|
16912
|
+
/** @description Minimum character count. */
|
|
16913
|
+
greaterThan?: number;
|
|
16914
|
+
/** @description Maximum character count. */
|
|
16915
|
+
lessThan?: number;
|
|
16916
|
+
};
|
|
16917
|
+
/** @description Used to perform a logical OR of filters. each element of the OR list can itself be a list to perform a nested AND. {or:[[A,B],C]} is equivalent to (A AND B) OR C */
|
|
16918
|
+
or?: (definitions["simpleSearchAndFlatFilterItem"][] | definitions["simpleSearchAndFlatFilterItem"])[];
|
|
16919
|
+
/** @description Used to perform NOT filter. Can be a single filter or a list of filters to perform a !(AND). {not:[A,B]} is equivalent to !(A AND B) */
|
|
16920
|
+
not?: definitions["simpleSearchAndFlatFilterItem"][] | definitions["simpleSearchAndFlatFilterItem"];
|
|
16921
|
+
/** @description Filter based on data within a _chunk_ field. */
|
|
16922
|
+
chunk?: {
|
|
16923
|
+
/** @description The path of the chunk field to filter on. For example: description_sentences_chunk_ */
|
|
16924
|
+
path: string;
|
|
16925
|
+
filters: definitions["simpleSearchAndFlatFilterItem"][];
|
|
16926
|
+
};
|
|
16927
|
+
}> & Partial<{
|
|
16928
|
+
strict?: "must" | "should" | "must_or";
|
|
16929
|
+
condition?: string;
|
|
16930
|
+
field?: string;
|
|
16931
|
+
filter_type?: "text_match" | "word_match" | "term" | "terms" | "text" | "texts" | "match" | "contains" | "substring" | "class" | "category" | "exact_match" | "classes" | "categories" | "exists" | "traditional" | "fuzzy" | "regexp" | "ids" | "date" | "numeric" | "search" | "or" | "word_count" | "character_count" | "dedupe_by_value";
|
|
16932
|
+
condition_value?: unknown;
|
|
16933
|
+
fuzzy?: number;
|
|
16934
|
+
join?: boolean;
|
|
16935
|
+
}>)[];
|
|
16936
|
+
/** Fields to include in the search results, empty array/list means all fields. */
|
|
16937
|
+
select_fields?: string[];
|
|
16938
|
+
/** Size of each page of results. */
|
|
16939
|
+
page_size?: number;
|
|
16940
|
+
/** Size of each page of results. */
|
|
16941
|
+
page?: number;
|
|
16942
|
+
/** Fields to sort by. For each field, sort by descending or ascending. If you are using descending by datetime, it will get the most recent ones. */
|
|
16943
|
+
sort?: (string | {
|
|
16944
|
+
[key: string]: "asc" | "desc";
|
|
16945
|
+
})[];
|
|
16946
|
+
/** Include vectors in the search results. */
|
|
16947
|
+
include_vector?: boolean;
|
|
16948
|
+
/** (NOT IMPLEMENTED - not functional) If true, retrieves documents randomly. */
|
|
16949
|
+
is_random?: boolean;
|
|
16950
|
+
/** (NOT IMPLEMENTED - not functional)Random Seed for retrieving random documents. */
|
|
16951
|
+
random_state?: number;
|
|
16952
|
+
/** Retrieve items after these sort values in the sort order. */
|
|
16953
|
+
after_id?: unknown[];
|
|
16954
|
+
};
|
|
16955
|
+
};
|
|
16956
|
+
responses: {
|
|
16957
|
+
/** successful operation */
|
|
16958
|
+
200: {
|
|
16959
|
+
content: {
|
|
16960
|
+
"application/json": components["schemas"]["ListDatasetSummaryHistoryOutput"];
|
|
15941
16961
|
};
|
|
15942
16962
|
};
|
|
15943
16963
|
};
|
|
15944
|
-
requestBody: {
|
|
15945
|
-
content: {
|
|
15946
|
-
"application/json": components["schemas"]["PaginateDocumentsInput"];
|
|
15947
|
-
};
|
|
15948
|
-
};
|
|
15949
16964
|
};
|
|
15950
16965
|
/**
|
|
15951
16966
|
* Retrieve documents by their IDs ("_id" field). This will retrieve the documents faster than a filter applied on the "_id" field. For single id lookup version of this request use /datasets/{dataset_id}/documents/get.
|
|
@@ -16977,6 +17992,116 @@ export interface operations {
|
|
|
16977
17992
|
};
|
|
16978
17993
|
};
|
|
16979
17994
|
};
|
|
17995
|
+
/**
|
|
17996
|
+
* ### Required permissions
|
|
17997
|
+
* > []
|
|
17998
|
+
*/
|
|
17999
|
+
DeleteComponent: {
|
|
18000
|
+
parameters: {
|
|
18001
|
+
path: {
|
|
18002
|
+
/** ID of component */
|
|
18003
|
+
component_id: string;
|
|
18004
|
+
};
|
|
18005
|
+
};
|
|
18006
|
+
responses: {
|
|
18007
|
+
/** successful operation */
|
|
18008
|
+
200: {
|
|
18009
|
+
content: {
|
|
18010
|
+
"application/json": components["schemas"]["DeleteComponentOutput"];
|
|
18011
|
+
};
|
|
18012
|
+
};
|
|
18013
|
+
};
|
|
18014
|
+
requestBody: {
|
|
18015
|
+
content: {
|
|
18016
|
+
"application/json": components["schemas"]["DeleteComponentInput"];
|
|
18017
|
+
};
|
|
18018
|
+
};
|
|
18019
|
+
};
|
|
18020
|
+
/**
|
|
18021
|
+
* ### Required permissions
|
|
18022
|
+
* > []
|
|
18023
|
+
*/
|
|
18024
|
+
ListComponents: {
|
|
18025
|
+
parameters: {};
|
|
18026
|
+
responses: {
|
|
18027
|
+
/** successful operation */
|
|
18028
|
+
200: {
|
|
18029
|
+
content: {
|
|
18030
|
+
"application/json": components["schemas"]["ListComponentsOutput"];
|
|
18031
|
+
};
|
|
18032
|
+
};
|
|
18033
|
+
};
|
|
18034
|
+
requestBody: {
|
|
18035
|
+
content: {
|
|
18036
|
+
"application/json": components["schemas"]["ListComponentsInput"];
|
|
18037
|
+
};
|
|
18038
|
+
};
|
|
18039
|
+
};
|
|
18040
|
+
/**
|
|
18041
|
+
* ### Required permissions
|
|
18042
|
+
* > []
|
|
18043
|
+
*/
|
|
18044
|
+
UpdateComponent: {
|
|
18045
|
+
parameters: {
|
|
18046
|
+
path: {
|
|
18047
|
+
/** ID of component */
|
|
18048
|
+
component_id: string;
|
|
18049
|
+
};
|
|
18050
|
+
};
|
|
18051
|
+
responses: {
|
|
18052
|
+
/** successful operation */
|
|
18053
|
+
200: {
|
|
18054
|
+
content: {
|
|
18055
|
+
"application/json": components["schemas"]["UpdateComponentOutput"];
|
|
18056
|
+
};
|
|
18057
|
+
};
|
|
18058
|
+
};
|
|
18059
|
+
requestBody: {
|
|
18060
|
+
content: {
|
|
18061
|
+
"application/json": components["schemas"]["UpdateComponentInput"];
|
|
18062
|
+
};
|
|
18063
|
+
};
|
|
18064
|
+
};
|
|
18065
|
+
/**
|
|
18066
|
+
* ### Required permissions
|
|
18067
|
+
* > []
|
|
18068
|
+
*/
|
|
18069
|
+
GetComponent: {
|
|
18070
|
+
parameters: {
|
|
18071
|
+
path: {
|
|
18072
|
+
/** ID of component */
|
|
18073
|
+
component_id: string;
|
|
18074
|
+
};
|
|
18075
|
+
};
|
|
18076
|
+
responses: {
|
|
18077
|
+
/** successful operation */
|
|
18078
|
+
200: {
|
|
18079
|
+
content: {
|
|
18080
|
+
"application/json": components["schemas"]["GetComponentOutput"];
|
|
18081
|
+
};
|
|
18082
|
+
};
|
|
18083
|
+
};
|
|
18084
|
+
};
|
|
18085
|
+
/**
|
|
18086
|
+
* ### Required permissions
|
|
18087
|
+
* > []
|
|
18088
|
+
*/
|
|
18089
|
+
CreateComponent: {
|
|
18090
|
+
parameters: {};
|
|
18091
|
+
responses: {
|
|
18092
|
+
/** successful operation */
|
|
18093
|
+
200: {
|
|
18094
|
+
content: {
|
|
18095
|
+
"application/json": components["schemas"]["CreateComponentOutput"];
|
|
18096
|
+
};
|
|
18097
|
+
};
|
|
18098
|
+
};
|
|
18099
|
+
requestBody: {
|
|
18100
|
+
content: {
|
|
18101
|
+
"application/json": components["schemas"]["CreateComponentInput"];
|
|
18102
|
+
};
|
|
18103
|
+
};
|
|
18104
|
+
};
|
|
16980
18105
|
}
|
|
16981
18106
|
export interface external {
|
|
16982
18107
|
}
|