2323
2424@dataclass (frozen = True )
2525class BaseSearchIndexType (abc .ABC ):
26+ """A class for search index types."""
2627 _proto_field_name : ClassVar [str ]
28+ #: the strategy used for chunking the index
2729 chunking_strategy : BaseIndexChunkingStrategy | None = None
2830
2931 @classmethod
@@ -64,6 +66,7 @@ def _from_upper_proto(cls, proto: ProtoSearchIndex, sdk: BaseSDK) -> BaseSearchI
6466
6567@dataclass (frozen = True )
6668class TextSearchIndexType (BaseSearchIndexType ):
69+ """A class which represents a text search index type."""
6770 _proto_field_name : ClassVar [str ] = 'text_search_index'
6871
6972 @classmethod
@@ -81,10 +84,12 @@ def _to_proto(self) -> TextSearchIndex:
8184
8285@dataclass (frozen = True )
8386class VectorSearchIndexType (BaseSearchIndexType ):
84- _proto_field_name : ClassVar [ str ] = 'vector_search_index'
87+ """A class which represents a vector search index type."""
8588
89+ _proto_field_name : ClassVar [str ] = 'vector_search_index'
90+ #: URI for the document embedder
8691 doc_embedder_uri : str | None = None
87-
92+ #: URI for the query embedder
8893 query_embedder_uri : str | None = None
8994
9095 @classmethod
@@ -106,11 +111,16 @@ def _to_proto(self) -> VectorSearchIndex:
106111
107112@dataclass (frozen = True )
108113class HybridSearchIndexType (BaseSearchIndexType ):
109- _proto_field_name : ClassVar [ str ] = 'hybrid_search_index'
114+ """A class which represents a hybrid search index type combining text and vector search indices."""
110115
116+ _proto_field_name : ClassVar [str ] = 'hybrid_search_index'
117+ #: the text search index associated with the hybrid index
111118 text_search_index : TextSearchIndexType | None = None
119+ #: the vector search index associated with the hybrid index
112120 vector_search_index : VectorSearchIndexType | None = None
121+ #: the strategy for normalizing index results
113122 normalization_strategy : IndexNormalizationStrategy | str | int | None = None
123+ #: the strategy for combining results from different indices
114124 combination_strategy : BaseIndexCombinationStrategy | None = None
115125
116126 @classmethod
0 commit comments