# WeaviateVectorStore

> **Class** in `langchain_weaviate`

📖 [View in docs](https://reference.langchain.com/python/langchain-weaviate/vectorstores/WeaviateVectorStore)

Weaviate vector store.

To use, you should have the `weaviate-client` python package installed.

## Signature

```python
WeaviateVectorStore(
    self,
    client: weaviate.WeaviateClient,
    index_name: Optional[str],
    text_key: str,
    embedding: Optional[Embeddings] = None,
    schema: Optional[dict] = None,
    attributes: Optional[List[str]] = None,
    relevance_score_fn: Optional[Callable[[float], float]] = _default_score_normalizer,
    use_multi_tenancy: Union[bool, Dict] = False,
)
```

## Description

**Example:**

```python
import weaviate
from langchain_community.vectorstores import Weaviate

client = weaviate.Client(url=os.environ["WEAVIATE_URL"], ...)
weaviate = Weaviate(client, index_name, text_key)
```

## Extends

- `VectorStore`

## Constructors

```python
__init__(
    self,
    client: weaviate.WeaviateClient,
    index_name: Optional[str],
    text_key: str,
    embedding: Optional[Embeddings] = None,
    schema: Optional[dict] = None,
    attributes: Optional[List[str]] = None,
    relevance_score_fn: Optional[Callable[[float], float]] = _default_score_normalizer,
    use_multi_tenancy: Union[bool, Dict] = False,
)
```

| Name | Type |
|------|------|
| `client` | `weaviate.WeaviateClient` |
| `index_name` | `Optional[str]` |
| `text_key` | `str` |
| `embedding` | `Optional[Embeddings]` |
| `schema` | `Optional[dict]` |
| `attributes` | `Optional[List[str]]` |
| `relevance_score_fn` | `Optional[Callable[[float], float]]` |
| `use_multi_tenancy` | `Union[bool, Dict]` |


## Properties

- `relevance_score_fn`
- `schema`
- `embeddings`

## Methods

- [`add_texts()`](https://reference.langchain.com/python/langchain-weaviate/vectorstores/WeaviateVectorStore/add_texts)
- [`similarity_search()`](https://reference.langchain.com/python/langchain-weaviate/vectorstores/WeaviateVectorStore/similarity_search)
- [`max_marginal_relevance_search()`](https://reference.langchain.com/python/langchain-weaviate/vectorstores/WeaviateVectorStore/max_marginal_relevance_search)
- [`max_marginal_relevance_search_by_vector()`](https://reference.langchain.com/python/langchain-weaviate/vectorstores/WeaviateVectorStore/max_marginal_relevance_search_by_vector)
- [`similarity_search_with_score()`](https://reference.langchain.com/python/langchain-weaviate/vectorstores/WeaviateVectorStore/similarity_search_with_score)
- [`from_texts()`](https://reference.langchain.com/python/langchain-weaviate/vectorstores/WeaviateVectorStore/from_texts)
- [`delete()`](https://reference.langchain.com/python/langchain-weaviate/vectorstores/WeaviateVectorStore/delete)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-weaviate/blob/9d7aa3a91b5cf874833976c303629c90a90e61f4/libs/weaviate/langchain_weaviate/vectorstores.py#L72)