Search Index, REST: SearchIndex.Create
- HTTP request
- Body parameters
- ExpirationConfig
- TextSearchIndex
- ChunkingStrategy
- StaticChunkingStrategy
- VectorSearchIndex
- HybridSearchIndex
- CombinationStrategy
- MeanCombinationStrategy
- ReciprocalRankFusionCombinationStrategy
- Response
- Status
- SearchIndex
- ExpirationConfig
- TextSearchIndex
- ChunkingStrategy
- StaticChunkingStrategy
- VectorSearchIndex
- HybridSearchIndex
- CombinationStrategy
- MeanCombinationStrategy
- ReciprocalRankFusionCombinationStrategy
Create a new search index in asynchronous mode.
HTTP request
POST https://rest-assistant.api.cloud.yandex.net/assistants/v1/searchIndex
Body parameters
{
"folderId": "string",
"fileIds": [
"string"
],
"name": "string",
"description": "string",
"expirationConfig": {
"expirationPolicy": "string",
"ttlDays": "string"
},
"labels": "object",
// Includes only one of the fields `textSearchIndex`, `vectorSearchIndex`, `hybridSearchIndex`
"textSearchIndex": {
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
}
},
"vectorSearchIndex": {
"docEmbedderUri": "string",
"queryEmbedderUri": "string",
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
}
},
"hybridSearchIndex": {
"textSearchIndex": {
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
}
},
"vectorSearchIndex": {
"docEmbedderUri": "string",
"queryEmbedderUri": "string",
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
}
},
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
},
"normalizationStrategy": "string",
"combinationStrategy": {
// Includes only one of the fields `meanCombination`, `rrfCombination`
"meanCombination": {
"meanEvaluationTechnique": "string",
"weights": [
"string"
]
},
"rrfCombination": {
"k": "string"
}
// end of the list of possible fields
}
}
// end of the list of possible fields
}
Request to create a new search index.
Field |
Description |
folderId |
string Required field. |
fileIds[] |
string List of file IDs to be indexed. |
name |
string Name of the search index. |
description |
string Description of the search index. |
expirationConfig |
Expiration configuration for the search index. |
labels |
object (map<string, string>) Set of key-value pairs to label the search index. |
textSearchIndex |
Configuration for a traditional keyword-based text search index. Includes only one of the fields |
vectorSearchIndex |
Configuration for a vector-based search index using embeddings. Includes only one of the fields |
hybridSearchIndex |
Configuration for a hybrid (vector-based + keyword-based) search index. Includes only one of the fields |
ExpirationConfig
Field |
Description |
expirationPolicy |
enum (ExpirationPolicy)
|
ttlDays |
string (int64) |
TextSearchIndex
Defines the configuration for a traditional keyword-based text search index.
Field |
Description |
chunkingStrategy |
Chunking strategy used to split text into smaller chunks before indexing. |
ChunkingStrategy
Defines a general strategy for chunking text into smaller segments.
Currently, only StaticChunkingStrategy is supported.
Field |
Description |
staticStrategy |
Includes only one of the fields |
StaticChunkingStrategy
Defines a chunking strategy where chunks are created with a fixed maximum chunk size and an overlap between consecutive chunks.
Field |
Description |
maxChunkSizeTokens |
string (int64) The maximum number of tokens allowed in a single chunk. |
chunkOverlapTokens |
string (int64) The number of tokens that should overlap between consecutive chunks. |
VectorSearchIndex
Defines the configuration for a vector-based search index. This type uses embeddings to represent documents and queries.
Field |
Description |
docEmbedderUri |
string The ID of the model to be used for obtaining document text embeddings. |
queryEmbedderUri |
string The ID of the model to be used for obtaining query text embeddings. |
chunkingStrategy |
Chunking strategy used to split text into smaller chunks before indexing. |
HybridSearchIndex
Defines the configuration for a hybrid (vector-based + keyword-based) search index. This type uses both embeddings and keyword-based search to represent documents and queries.
Field |
Description |
textSearchIndex |
Configuration for a traditional keyword-based text search index. |
vectorSearchIndex |
Configuration for a vector-based search index. |
chunkingStrategy |
Common chunking strategy that applies to both text and vector search indexes. |
normalizationStrategy |
enum (NormalizationStrategy) Normalization strategy for relevance scores from different indices. Default is MIN_MAX_STRATEGY
|
combinationStrategy |
Combination strategy for merging rankings from different indices. Default is arithmetic mean |
CombinationStrategy
Combination strategy for merging rankings from different indices
Field |
Description |
meanCombination |
Includes only one of the fields |
rrfCombination |
ReciprocalRankFusionCombinationStrategy Includes only one of the fields |
MeanCombinationStrategy
Field |
Description |
meanEvaluationTechnique |
enum (MeanEvaluationTechnique) Technique for averaging relevance scores from different indices. Default is ARITHMETIC
|
weights[] |
string Weights used for evaluating the weighted mean of relevance scores. The sum of the values must equal 1.0 |
ReciprocalRankFusionCombinationStrategy
https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf
Field |
Description |
k |
string (int64) The parameter k for RRFscore. Default is 60 |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": "object",
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": {
"id": "string",
"folderId": "string",
"name": "string",
"description": "string",
"createdBy": "string",
"createdAt": "string",
"updatedBy": "string",
"updatedAt": "string",
"expirationConfig": {
"expirationPolicy": "string",
"ttlDays": "string"
},
"expiresAt": "string",
"labels": "object",
// Includes only one of the fields `textSearchIndex`, `vectorSearchIndex`, `hybridSearchIndex`
"textSearchIndex": {
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
}
},
"vectorSearchIndex": {
"docEmbedderUri": "string",
"queryEmbedderUri": "string",
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
}
},
"hybridSearchIndex": {
"textSearchIndex": {
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
}
},
"vectorSearchIndex": {
"docEmbedderUri": "string",
"queryEmbedderUri": "string",
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
}
},
"chunkingStrategy": {
// Includes only one of the fields `staticStrategy`
"staticStrategy": {
"maxChunkSizeTokens": "string",
"chunkOverlapTokens": "string"
}
// end of the list of possible fields
},
"normalizationStrategy": "string",
"combinationStrategy": {
// Includes only one of the fields `meanCombination`, `rrfCombination`
"meanCombination": {
"meanEvaluationTechnique": "string",
"weights": [
"string"
]
},
"rrfCombination": {
"k": "string"
}
// end of the list of possible fields
}
}
// end of the list of possible fields
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
done |
boolean If the value is |
metadata |
object Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
Status
The error result of the operation in case of failure or cancellation.
Field |
Description |
code |
integer (int32) Error code. An enum value of google.rpc.Code |
message |
string An error message. |
details[] |
object A list of messages that carry the error details. |
SearchIndex
Represents a search index used to store and query data, either using traditional keyword-based text search or vector-based search mechanisms.
Field |
Description |
id |
string Unique identifier of the search index. |
folderId |
string ID of the folder that the search index belongs to. |
name |
string Name of the search index. |
description |
string Description of the search index. |
createdBy |
string Identifier of the subject who created this search index. |
createdAt |
string (date-time) Timestamp representing when the search index was created. String in RFC3339 To work with values in this field, use the APIs described in the |
updatedBy |
string Identifier of the subject who last updated this search index. |
updatedAt |
string (date-time) Timestamp representing the last time this search index was updated. String in RFC3339 To work with values in this field, use the APIs described in the |
expirationConfig |
Configuration for the expiration of the search index, defining when and how the search index will expire. |
expiresAt |
string (date-time) Timestamp representing when the search index will expire. String in RFC3339 To work with values in this field, use the APIs described in the |
labels |
object (map<string, string>) Set of key-value pairs that can be used to organize and categorize the search index. |
textSearchIndex |
Keyword-based text search index configuration. Includes only one of the fields Type of the search index. It can be either a traditional keyword-based text search or a vector-based search. |
vectorSearchIndex |
Vector-based search index configuration. Includes only one of the fields Type of the search index. It can be either a traditional keyword-based text search or a vector-based search. |
hybridSearchIndex |
Hybrid (vector-based + keyword-based) search index configuration Includes only one of the fields Type of the search index. It can be either a traditional keyword-based text search or a vector-based search. |
ExpirationConfig
Field |
Description |
expirationPolicy |
enum (ExpirationPolicy)
|
ttlDays |
string (int64) |
TextSearchIndex
Defines the configuration for a traditional keyword-based text search index.
Field |
Description |
chunkingStrategy |
Chunking strategy used to split text into smaller chunks before indexing. |
ChunkingStrategy
Defines a general strategy for chunking text into smaller segments.
Currently, only StaticChunkingStrategy is supported.
Field |
Description |
staticStrategy |
Includes only one of the fields |
StaticChunkingStrategy
Defines a chunking strategy where chunks are created with a fixed maximum chunk size and an overlap between consecutive chunks.
Field |
Description |
maxChunkSizeTokens |
string (int64) The maximum number of tokens allowed in a single chunk. |
chunkOverlapTokens |
string (int64) The number of tokens that should overlap between consecutive chunks. |
VectorSearchIndex
Defines the configuration for a vector-based search index. This type uses embeddings to represent documents and queries.
Field |
Description |
docEmbedderUri |
string The ID of the model to be used for obtaining document text embeddings. |
queryEmbedderUri |
string The ID of the model to be used for obtaining query text embeddings. |
chunkingStrategy |
Chunking strategy used to split text into smaller chunks before indexing. |
HybridSearchIndex
Defines the configuration for a hybrid (vector-based + keyword-based) search index. This type uses both embeddings and keyword-based search to represent documents and queries.
Field |
Description |
textSearchIndex |
Configuration for a traditional keyword-based text search index. |
vectorSearchIndex |
Configuration for a vector-based search index. |
chunkingStrategy |
Common chunking strategy that applies to both text and vector search indexes. |
normalizationStrategy |
enum (NormalizationStrategy) Normalization strategy for relevance scores from different indices. Default is MIN_MAX_STRATEGY
|
combinationStrategy |
Combination strategy for merging rankings from different indices. Default is arithmetic mean |
CombinationStrategy
Combination strategy for merging rankings from different indices
Field |
Description |
meanCombination |
Includes only one of the fields |
rrfCombination |
ReciprocalRankFusionCombinationStrategy Includes only one of the fields |
MeanCombinationStrategy
Field |
Description |
meanEvaluationTechnique |
enum (MeanEvaluationTechnique) Technique for averaging relevance scores from different indices. Default is ARITHMETIC
|
weights[] |
string Weights used for evaluating the weighted mean of relevance scores. The sum of the values must equal 1.0 |
ReciprocalRankFusionCombinationStrategy
https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf
Field |
Description |
k |
string (int64) The parameter k for RRFscore. Default is 60 |