running into an issue using AzureAISearchVectorStore here when trying to use this vector store instead of deafult in-memory:
# Define metadata fields mapping
metadata_fields = {
"doc_id": ("doc_id", MetadataIndexFieldType.STRING),
"page_num": ("page_num", MetadataIndexFieldType.INT64),
"image_path": ("image_path", MetadataIndexFieldType.STRING),
"parsed_text_markdown": ("parsed_text_markdown", MetadataIndexFieldType.STRING),
"context": ("context", MetadataIndexFieldType.STRING),
}
# Initialize Azure AI Search vector store
vector_store = AzureAISearchVectorStore(
search_or_index_client=index_client,
index_name="llamaindex-multimodal-contextual-retreival",
index_management=IndexManagement.CREATE_IF_NOT_EXISTS,
id_field_key="id",
chunk_field_key="parsed_text_markdown",
embedding_field_key="embedding",
embedding_dimensionality=1536, # Based on embedding model
metadata_string_field_key="metadata", # Stores all metadata as a JSON string
doc_id_field_key="doc_id",
filterable_metadata_field_keys=metadata_fields,
language_analyzer="en.lucene",
vector_algorithm_type="exhaustiveKnn",
)
# Create storage context
storage_context = StorageContext.from_defaults(vector_store=vector_store)
# Build the index
index = VectorStoreIndex.from_documents(
new_text_nodes,
storage_context=storage_context,
llm=llm,
embed_model=embed_model,
)
Error: AttributeError: 'TextNode' object has no attribute 'get_doc_id'