You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn.
422
422
* @availability stack since=8.14.0
423
-
* @availability serverless
424
-
*/
423
+
* @availability serverless
424
+
*/
425
425
retriever?: RetrieverContainer
426
426
/**
427
427
* Retrieve a script evaluation (based on different fields) for each hit.
Copy file name to clipboardExpand all lines: specification/_types/Retriever.ts
+41-41Lines changed: 41 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -27,55 +27,55 @@ import { FieldCollapse } from '@global/search/_types/FieldCollapse'
27
27
* @variants container
28
28
*/
29
29
exportclassRetrieverContainer{
30
-
/** A retriever that replaces the functionality of a traditional query. */
31
-
standard?: StandardRetriever
32
-
/** A retriever that replaces the functionality of a knn search. */
33
-
knn?: KnnRetriever
34
-
/** A retriever that produces top documents from reciprocal rank fusion (RRF). */
35
-
rrf?: RRFRetriever
30
+
/** A retriever that replaces the functionality of a traditional query. */
31
+
standard?: StandardRetriever
32
+
/** A retriever that replaces the functionality of a knn search. */
33
+
knn?: KnnRetriever
34
+
/** A retriever that produces top documents from reciprocal rank fusion (RRF). */
35
+
rrf?: RRFRetriever
36
36
}
37
37
38
-
exportclassRetrieverBase{}
38
+
exportclassRetrieverBase{}
39
39
40
40
exportclassStandardRetrieverextendsRetrieverBase{
41
-
/** Defines a query to retrieve a set of top documents. */
42
-
query?: QueryContainer
43
-
/** Applies a boolean query filter to this retriever where all documents must match this query but do not contribute to the score. */
44
-
filter?: QueryContainer|QueryContainer[]
45
-
/** Defines a search after object parameter used for pagination. */
46
-
search_after?: SortResults
47
-
/** Maximum number of documents to collect for each shard. */
48
-
terminate_after?: integer
49
-
/** A sort object that that specifies the order of matching documents. */
50
-
sort?: Sort
51
-
/** Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. */
52
-
min_score?: float
53
-
/** Collapses the top documents by a specified key into a single top document per key. */
54
-
collapse?: FieldCollapse
41
+
/** Defines a query to retrieve a set of top documents. */
42
+
query?: QueryContainer
43
+
/** Applies a boolean query filter to this retriever where all documents must match this query but do not contribute to the score. */
44
+
filter?: QueryContainer|QueryContainer[]
45
+
/** Defines a search after object parameter used for pagination. */
46
+
search_after?: SortResults
47
+
/** Maximum number of documents to collect for each shard. */
48
+
terminate_after?: integer
49
+
/** A sort object that that specifies the order of matching documents. */
50
+
sort?: Sort
51
+
/** Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. */
52
+
min_score?: float
53
+
/** Collapses the top documents by a specified key into a single top document per key. */
54
+
collapse?: FieldCollapse
55
55
}
56
56
57
57
exportclassKnnRetrieverextendsRetrieverBase{
58
-
/** The name of the vector field to search against. */
59
-
field: String
60
-
/** Query vector. Must have the same number of dimensions as the vector field you are searching against. You must provide a query_vector_builder or query_vector, but not both. */
61
-
query_vector?: float[]
62
-
/** Defines a model to build a query vector. */
63
-
query_vector_builder?: QueryVectorBuilder
64
-
/** Number of nearest neighbors to return as top hits. */
65
-
k: integer
66
-
/** Number of nearest neighbor candidates to consider per shard. */
67
-
num_candidates: integer
68
-
/** Query to filter the documents that can match. The kNN search will return the top k documents that also match this filter. */
69
-
filter?: QueryContainer|QueryContainer[]
70
-
/** The minimum similarity required for a document to be considered a match. */
71
-
similarity?: float
58
+
/** The name of the vector field to search against. */
59
+
field: String
60
+
/** Query vector. Must have the same number of dimensions as the vector field you are searching against. You must provide a query_vector_builder or query_vector, but not both. */
61
+
query_vector?: float[]
62
+
/** Defines a model to build a query vector. */
63
+
query_vector_builder?: QueryVectorBuilder
64
+
/** Number of nearest neighbors to return as top hits. */
65
+
k: integer
66
+
/** Number of nearest neighbor candidates to consider per shard. */
67
+
num_candidates: integer
68
+
/** Query to filter the documents that can match. The kNN search will return the top k documents that also match this filter. */
69
+
filter?: QueryContainer|QueryContainer[]
70
+
/** The minimum similarity required for a document to be considered a match. */
71
+
similarity?: float
72
72
}
73
73
74
74
exportclassRRFRetrieverextendsRetrieverBase{
75
-
/** A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them. */
76
-
retrievers: RetrieverContainer[]
77
-
/** This value determines how much influence documents in individual result sets per query have over the final ranked result set. */
78
-
rank_constant?: integer
79
-
/** This value determines the size of the individual result sets per query. */
80
-
window_size?: integer
75
+
/** A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them. */
76
+
retrievers: RetrieverContainer[]
77
+
/** This value determines how much influence documents in individual result sets per query have over the final ranked result set. */
78
+
rank_constant?: integer
79
+
/** This value determines the size of the individual result sets per query. */
0 commit comments