# VectorSearchSearcher

> **Class** in `langchain_google_vertexai`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-vertexai/vectorstores/_searcher/VectorSearchSearcher)

Class to interface with Vector Search indexes (v1) and collections (v2).

## Signature

```python
VectorSearchSearcher(
    self,
    endpoint: MatchingEngineIndexEndpoint | None,
    index: MatchingEngineIndex | None = None,
    staging_bucket: storage.Bucket | None = None,
    stream_update: bool = False,
    *,
    collection: SimpleNamespace | None = None,
    api_version: str = 'v1',
    project_id: str | None = None,
    region: str | None = None,
    credentials: Any = None,
    vector_field_name: str = 'embedding',
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `endpoint` | `MatchingEngineIndexEndpoint \| None` | Yes | The index endpoint (v1 only, None for v2). |
| `index` | `MatchingEngineIndex \| None` | No | The index object (v1 only, None for v2). (default: `None`) |
| `collection` | `SimpleNamespace \| None` | No | The collection object (v2 only, None for v1). (default: `None`) |
| `staging_bucket` | `storage.Bucket \| None` | No | GCS bucket for staging data (v1 only). (default: `None`) |
| `stream_update` | `bool` | No | Whether to use streaming updates. (v1 only). (default: `False`) |
| `api_version` | `str` | No | Version of the Vector Search API ("v1" or "v2"). (default: `'v1'`) |
| `project_id` | `str \| None` | No | GCP project ID (v2 only). (default: `None`) |
| `region` | `str \| None` | No | GCP region (v2 only). (default: `None`) |
| `credentials` | `Any` | No | GCP credentials (v2 only). (default: `None`) |
| `vector_field_name` | `str` | No | Name of the vector field in the schema (v2 only). (default: `'embedding'`) |

## Extends

- `Searcher`

## Constructors

```python
__init__(
    self,
    endpoint: MatchingEngineIndexEndpoint | None,
    index: MatchingEngineIndex | None = None,
    staging_bucket: storage.Bucket | None = None,
    stream_update: bool = False,
    *,
    collection: SimpleNamespace | None = None,
    api_version: str = 'v1',
    project_id: str | None = None,
    region: str | None = None,
    credentials: Any = None,
    vector_field_name: str = 'embedding',
)
```

| Name | Type |
|------|------|
| `endpoint` | `MatchingEngineIndexEndpoint \| None` |
| `index` | `MatchingEngineIndex \| None` |
| `staging_bucket` | `storage.Bucket \| None` |
| `stream_update` | `bool` |
| `collection` | `SimpleNamespace \| None` |
| `api_version` | `str` |
| `project_id` | `str \| None` |
| `region` | `str \| None` |
| `credentials` | `Any` |
| `vector_field_name` | `str` |


## Methods

- [`remove_datapoints()`](https://reference.langchain.com/python/langchain-google-vertexai/vectorstores/_searcher/VectorSearchSearcher/remove_datapoints)
- [`add_to_index()`](https://reference.langchain.com/python/langchain-google-vertexai/vectorstores/_searcher/VectorSearchSearcher/add_to_index)
- [`find_neighbors()`](https://reference.langchain.com/python/langchain-google-vertexai/vectorstores/_searcher/VectorSearchSearcher/find_neighbors)
- [`get_datapoints_by_filter()`](https://reference.langchain.com/python/langchain-google-vertexai/vectorstores/_searcher/VectorSearchSearcher/get_datapoints_by_filter)
- [`semantic_search()`](https://reference.langchain.com/python/langchain-google-vertexai/vectorstores/_searcher/VectorSearchSearcher/semantic_search)
- [`text_search()`](https://reference.langchain.com/python/langchain-google-vertexai/vectorstores/_searcher/VectorSearchSearcher/text_search)
- [`hybrid_search()`](https://reference.langchain.com/python/langchain-google-vertexai/vectorstores/_searcher/VectorSearchSearcher/hybrid_search)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/982e4015b249de8b9ba1e787746d8cc1f6d6b790/libs/vertexai/langchain_google_vertexai/vectorstores/_searcher.py#L210)