searchable=True,        vector_search_dimensions=len(embedding_function("Text")),        vector_search_configuration="default",    ),    SearchableField(        name="metadata",        type=SearchFieldDataType.String,        searchable=True,    ),    # Additional field to store the title    SearchableField(        name="title",        type=SearchFieldDataType.String,        searchable=True,    ),    # Additional field for filtering on document source    SimpleField(        name="source",        type=SearchFieldDataType.String,        filterable=True,    ),]index_name: str = "langchain-vector-demo-custom"vector_store: AzureSearch = AzureSearch(    azure_search_endpoint=vector_store_address,    azure_search_key=vector_store_password,    index_name=index_name,    embedding_function=embedding_function,    fields=fields,)Perform a query with a custom filter# Data in the metadata dictionary with a corresponding field in the index will be added to the index# In this example, the metadata dictionary contains a title, a source and a random field# The title and the source will be added to the index as separate fields, but the random won't. (as it is not defined in the fields list)# The random field will be only stored in the metadata fieldvector_store.add_texts(    ["Test 1", "Test 2", "Test 3"],    [        {"title": "Title 1", "source": "A", "random": "10290"},        {"title": "Title 2", "source": "A", "random": "48392"},        {"title": "Title 3", "source": "B", "random": "32893"},    ],)res = vector_store.similarity_search(query="Test 3 source1", k=3, search_type="hybrid")res    [Document(page_content='Test 3', metadata={'title': 'Title 3', 'source': 'B', 'random': '32893'}),     Document(page_content='Test 1', metadata={'title': 'Title 1', 'source': 'A', 'random': '10290'}),     Document(page_content='Test 2', metadata={'title': 'Title 2', 'source': 'A', 'random': '48392'})]res = vector_store.similarity_search(query="Test 3 source1", k=3, search_type="hybrid",
Azure Cognitive Search (formerly known as Azure Search) is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.
Azure Cognitive Search (formerly known as Azure Search) is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications. ->: searchable=True,        vector_search_dimensions=len(embedding_function("Text")),        vector_search_configuration="default",    ),    SearchableField(        name="metadata",        type=SearchFieldDataType.String,        searchable=True,    ),    # Additional field to store the title    SearchableField(        name="title",        type=SearchFieldDataType.String,        searchable=True,    ),    # Additional field for filtering on document source    SimpleField(        name="source",        type=SearchFieldDataType.String,        filterable=True,    ),]index_name: str = "langchain-vector-demo-custom"vector_store: AzureSearch = AzureSearch(    azure_search_endpoint=vector_store_address,    azure_search_key=vector_store_password,    index_name=index_name,    embedding_function=embedding_function,    fields=fields,)Perform a query with a custom filter# Data in the metadata dictionary with a corresponding field in the index will be added to the index# In this example, the metadata dictionary contains a title, a source and a random field# The title and the source will be added to the index as separate fields, but the random won't. (as it is not defined in the fields list)# The random field will be only stored in the metadata fieldvector_store.add_texts(    ["Test 1", "Test 2", "Test 3"],    [        {"title": "Title 1", "source": "A", "random": "10290"},        {"title": "Title 2", "source": "A", "random": "48392"},        {"title": "Title 3", "source": "B", "random": "32893"},    ],)res = vector_store.similarity_search(query="Test 3 source1", k=3, search_type="hybrid")res    [Document(page_content='Test 3', metadata={'title': 'Title 3', 'source': 'B', 'random': '32893'}),     Document(page_content='Test 1', metadata={'title': 'Title 1', 'source': 'A', 'random': '10290'}),     Document(page_content='Test 2', metadata={'title': 'Title 2', 'source': 'A', 'random': '48392'})]res = vector_store.similarity_search(query="Test 3 source1", k=3, search_type="hybrid",