@@ -99,6 +99,7 @@ def vector_search(
9999 distance_type : Optional [Literal ["euclidean" , "cosine" , "dot_product" ]] = None ,
100100 fraction_lists_to_search : Optional [float ] = None ,
101101 use_brute_force : Optional [bool ] = None ,
102+ allow_large_results : Optional [bool ] = None ,
102103) -> dataframe .DataFrame :
103104 """
104105 Conduct vector search which searches embeddings to find semantically similar entities.
@@ -199,6 +200,10 @@ def vector_search(
199200 use_brute_force (bool):
200201 Determines whether to use brute force search by skipping the vector index if one is available.
201202 Default to False.
203+ allow_large_results (bool, optional):
204+ Whether to allow large query results. If ``True``, the query
205+ results can be larger than the maximum response size.
206+ Defaults to ``bpd.options.compute.allow_large_results``.
202207
203208 Returns:
204209 bigframes.dataframe.DataFrame: A DataFrame containing vector search result.
@@ -236,9 +241,11 @@ def vector_search(
236241 options = options ,
237242 )
238243 if index_col_ids is not None :
239- df = query ._session .read_gbq (sql , index_col = index_col_ids )
244+ df = query ._session .read_gbq_query (
245+ sql , index_col = index_col_ids , allow_large_results = allow_large_results
246+ )
240247 df .index .names = index_labels
241248 else :
242- df = query ._session .read_gbq (sql )
249+ df = query ._session .read_gbq_query (sql , allow_large_results = allow_large_results )
243250
244251 return df
0 commit comments