Skip to content

Commit 28db1fd

Browse files
committed
fix format
1 parent 2c4911d commit 28db1fd

File tree

2 files changed

+43
-43
lines changed

2 files changed

+43
-43
lines changed

specification/_global/search/SearchRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ export interface Request extends RequestBase {
420420
/**
421421
* 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.
422422
* @availability stack since=8.14.0
423-
* @availability serverless
424-
*/
423+
* @availability serverless
424+
*/
425425
retriever?: RetrieverContainer
426426
/**
427427
* Retrieve a script evaluation (based on different fields) for each hit.

specification/_types/Retriever.ts

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -27,55 +27,55 @@ import { FieldCollapse } from '@global/search/_types/FieldCollapse'
2727
* @variants container
2828
*/
2929
export class RetrieverContainer {
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
3636
}
3737

38-
export class RetrieverBase { }
38+
export class RetrieverBase {}
3939

4040
export class StandardRetriever extends RetrieverBase {
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
5555
}
5656

5757
export class KnnRetriever extends RetrieverBase {
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
7272
}
7373

7474
export class RRFRetriever extends RetrieverBase {
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. */
80+
window_size?: integer
8181
}

0 commit comments

Comments
 (0)