ValueError: Index with name vector already exists.The provided embedding function and vector index dimensions do not match.
Labels: name: area: embeddings, name: auto:bug

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation, with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.

### Example Code

```
# Chunking the sentence with fixed size
from langchain.text_splitter import RecursiveCharacterTextSplitter

text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=20)
all_splits = text_splitter.split_documents(documents)
```

```
# Creating Embdeddings of the sentences and storing it into Graph DB
from langchain_community.embeddings import HuggingFaceBgeEmbeddings
from langchain.vectorstores import Neo4jVector

model_name = "BAAI/bge-small-en"
model_kwargs = {"device": "cuda"}

embeddings = HuggingFaceBgeEmbeddings(model_name=model_name, model_kwargs=model_kwargs)

# storing embeddings in the vector store
vectorstore = Neo4jVector.from_documents(all_splits, embeddings)
```

```
# Instantiate Neo4j vector from documents
neo4j_new_index = Neo4jVector.from_documents(
    documents,
    HuggingFaceBgeEmbeddings(),
    url=os.environ["NEO4J_URI"],
    username=os.environ["NEO4J_USERNAME"],
    password=os.environ["NEO4J_PASSWORD"]
)
```

```
ERROR:neo4j.io:Failed to write data to connection ResolvedIPv4Address(('34.126.171.25', 7687)) (ResolvedIPv4Address(('34.126.171.25', 7687)))
ERROR:neo4j.io:Failed to write data to connection IPv4Address(('07e87ccd.databases.neo4j.io', 7687)) (ResolvedIPv4Address(('34.126.171.25', 7687)))
ERROR:neo4j.io:Failed to write data to connection ResolvedIPv4Address(('34.126.171.25', 7687)) (ResolvedIPv4Address(('34.126.171.25', 7687)))
ERROR:neo4j.io:Failed to write data to connection IPv4Address(('07e87ccd.databases.neo4j.io', 7687)) (ResolvedIPv4Address(('34.126.171.25', 7687)))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-25-7220f62f84c8>](https://localhost:8080/#) in <cell line: 2>()
      1 # Instantiate Neo4j vector from documents
----> 2 neo4j_new_index = Neo4jVector.from_documents(
      3     documents,
      4     HuggingFaceBgeEmbeddings(),
      5     url=os.environ["NEO4J_URI"],

2 frames
[/usr/local/lib/python3.10/dist-packages/langchain_community/vectorstores/neo4j_vector.py](https://localhost:8080/#) in __from(cls, texts, embeddings, embedding, metadatas, ids, create_id_index, search_type, **kwargs)
    445         # If the index already exists, check if embedding dimensions match
    446         elif not store.embedding_dimension == embedding_dimension:
--> 447             raise ValueError(
    448                 f"Index with name {store.index_name} already exists."
    449                 "The provided embedding function and vector index "

ValueError: Index with name vector already exists.The provided embedding function and vector index dimensions do not match.
Embedding function dimension: 1024
Vector index dimension: 384
```

### Description

```
ERROR:neo4j.io:Failed to write data to connection ResolvedIPv4Address(('34.126.171.25', 7687)) (ResolvedIPv4Address(('34.126.171.25', 7687)))
ERROR:neo4j.io:Failed to write data to connection IPv4Address(('07e87ccd.databases.neo4j.io', 7687)) (ResolvedIPv4Address(('34.126.171.25', 7687)))
ERROR:neo4j.io:Failed to write data to connection ResolvedIPv4Address(('34.126.171.25', 7687)) (ResolvedIPv4Address(('34.126.171.25', 7687)))
ERROR:neo4j.io:Failed to write data to connection IPv4Address(('07e87ccd.databases.neo4j.io', 7687)) (ResolvedIPv4Address(('34.126.171.25', 7687)))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-25-7220f62f84c8>](https://localhost:8080/#) in <cell line: 2>()
      1 # Instantiate Neo4j vector from documents
----> 2 neo4j_new_index = Neo4jVector.from_documents(
      3     documents,
      4     HuggingFaceBgeEmbeddings(),
      5     url=os.environ["NEO4J_URI"],

2 frames
[/usr/local/lib/python3.10/dist-packages/langchain_community/vectorstores/neo4j_vector.py](https://localhost:8080/#) in __from(cls, texts, embeddings, embedding, metadatas, ids, create_id_index, search_type, **kwargs)
    445         # If the index already exists, check if embedding dimensions match
    446         elif not store.embedding_dimension == embedding_dimension:
--> 447             raise ValueError(
    448                 f"Index with name {store.index_name} already exists."
    449                 "The provided embedding function and vector index "

ValueError: Index with name vector already exists.The provided embedding function and vector index dimensions do not match.
Embedding function dimension: 1024
Vector index dimension: 384
```

### System Info

Windows: `11`
pip == `23.3.1`
python == `3.10.10`
langchain ==` 0.1.0`
transformers == `4.36.2`
sentence_transformers == `2.2.2`
Neo4j == `5`

### Related Components

- [ ] LLMs/Chat Models
- [X] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [X] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async