indexers.dataclasses.VectorStoreSearchInput

indexers.dataclasses.VectorStoreSearchInput(data)

DataFrame-like object for forming and validating search query input data.

This class validates and represents input queries for vector store search. Each row contains a unique query identifier and the associated query text.

Attributes

Name Type Description
id pd.Series Unique identifier for each query.
query pd.Series The query text to search for.

Methods

Name Description
from_data Create a validated VectorStoreSearchInput from a dictionary or DataFrame.
validate Validate an existing DataFrame and return a VectorStoreSearchInput.

from_data

indexers.dataclasses.VectorStoreSearchInput.from_data(data)

Create a validated VectorStoreSearchInput from a dictionary or DataFrame.

Creates a new instance of VectorStoreSearchInput by validating the input data against the defined schema.

Parameters

Name Type Description Default
data dict | pd.DataFrame A dictionary or pandas DataFrame containing the input data. Must include ‘id’ and ‘query’ columns/keys. required

Returns

Name Type Description
VectorStoreSearchInput VectorStoreSearchInput A validated instance of the class.

validate

indexers.dataclasses.VectorStoreSearchInput.validate(df)

Validate an existing DataFrame and return a VectorStoreSearchInput.

Validates the provided pandas DataFrame against the defined schema and returns a new instance of VectorStoreSearchInput if validation is successful.

Parameters

Name Type Description Default
df pd.DataFrame A pandas DataFrame to validate. Must include ‘id’ and ‘query’ columns. required

Returns

Name Type Description
VectorStoreSearchInput VectorStoreSearchInput A validated instance of the class.