Find answers from the community

s
F
Y
a
P
Updated last year

has anyone taken an existing

has anyone taken an existing elasticsearch (or any) index and retrofitted llamaindex on top of it? i am trying to do that with an existing elasticsearch index i have, but keep running into

File "C:\Python311\Lib\site-packages\llama_index\vector_stores\elasticsearch.py", line 542, in aquery
f"Could not parse metadata from hit {hit['_source']['metadata']}"
~~~~~~^^^^^^^^^^^^
KeyError: 'metadata'

understandably because the format of the metadata in my Elasticsearch index is not the expected format for the ElasticsearchStore class in LlamaIndex. how do you get around this without having to re-index everything?
L
f
3 comments
hmm I think there's needs to be a PR to let the user specify their own text and metadata fields.

Otherwise, re-embedding is the only option (and tbh, embeddings are cheap/easy, so not a huge deal unless you have 100s of GBs of data to embed)
yeah, but this is a centralized index with many downstream consumers, so i can't change too much
that's fair. Sounds like it needs a PR to work then lol
Add a reply
Sign up and join the conversation on Discord