Query on existing index
Okay, seems like sending `index_name` and `embedding` is enough. text_key is the key in the metadata where the text associated with the embeddings is stored. namespace is optional, depends if you are using it or not


How to query from an existing index?

I filled up an index in Pinecode using:

```
docsearch = Pinecone.from_texts([t.page_content for t in texts], embeddings, index_name=index_name)
```

Now, I'm creating a separate `.py` file, where I need to use the existing index to query. As I understand I need to use the following function:

```
    @classmethod
    def from_existing_index(
        cls,
        index_name: str,
        embedding: Embeddings,
        text_key: str = "text",
        namespace: Optional[str] = None,
    ) -> Pinecone:
        """Load pinecone vectorstore from index name."""
        try:
            import pinecone
        except ImportError:
            raise ValueError(
                "Could not import pinecone python package. "
                "Please install it with `pip install pinecone-client`."
            )

        return cls(
            pinecone.Index(index_name), embedding.embed_query, text_key, namespace
        )
```

but what are the arguments there? I know only my `index_name` . What are the rest arguments? Embeddings are embeddings from OpenAI, right?
e.g.:
```
embeddings = OpenAIEmbeddings(openai_api_key=OPENAI_API_KEY)
```

 What is the `text_key`? And what `name_space` ?